* [FFmpeg-devel] [PATCH] avformat/avformat: Schedule AVOutputFormat.data_codec for removal
@ 2022-05-05 12:46 Andreas Rheinhardt
2022-05-05 12:54 ` Diederick C. Niehorster
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2022-05-05 12:46 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
No AVOutputFormat has this set. It is not removed immediately despite
being private because of the libavdevice<->libavformat situation.
The fact that this field is private is also the reason why no FF_API_*
define has been added.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavformat/avformat.h | 2 ++
libavformat/format.c | 2 --
libavformat/utils.c | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f12fa7d904..69d1d0fa3d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -614,7 +614,9 @@ typedef struct AVOutputFormat {
* @see avdevice_list_devices() for more details.
*/
int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
+#if LIBAVFORMAT_VERSION_MAJOR < 60
enum AVCodecID data_codec; /**< default data codec */
+#endif
/**
* Initialize format. May allocate data here, and set any AVFormatContext or
* AVStream parameters that need to be set before packets are sent.
diff --git a/libavformat/format.c b/libavformat/format.c
index 4b1f3c2986..76f25ab5a6 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -111,8 +111,6 @@ enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name,
return fmt->audio_codec;
else if (type == AVMEDIA_TYPE_SUBTITLE)
return fmt->subtitle_codec;
- else if (type == AVMEDIA_TYPE_DATA)
- return fmt->data_codec;
else
return AV_CODEC_ID_NONE;
}
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3f253c2045..7fbc3a4a18 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1293,8 +1293,7 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
return !!av_codec_get_tag2(ofmt->codec_tag, codec_id, &codec_tag);
else if (codec_id == ofmt->video_codec ||
codec_id == ofmt->audio_codec ||
- codec_id == ofmt->subtitle_codec ||
- codec_id == ofmt->data_codec)
+ codec_id == ofmt->subtitle_codec)
return 1;
}
return AVERROR_PATCHWELCOME;
--
2.32.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avformat/avformat: Schedule AVOutputFormat.data_codec for removal
2022-05-05 12:46 [FFmpeg-devel] [PATCH] avformat/avformat: Schedule AVOutputFormat.data_codec for removal Andreas Rheinhardt
@ 2022-05-05 12:54 ` Diederick C. Niehorster
0 siblings, 0 replies; 2+ messages in thread
From: Diederick C. Niehorster @ 2022-05-05 12:54 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Hi Andreas,
On Thu, May 5, 2022 at 2:47 PM Andreas Rheinhardt
<andreas.rheinhardt@outlook.com> wrote:
>
> No AVOutputFormat has this set. It is not removed immediately despite
> being private because of the libavdevice<->libavformat situation.
> The fact that this field is private is also the reason why no FF_API_*
> define has been added.
Since you bring up the libavdevice<->libavformat situation, allow me
to plug this patch again
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-March/294747.html.
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-March/294746.html has
links to previous discussions of the issue.
I hope you and others who chimed in before (e.g., Nicolas, Anton) have
a chance to look at this potential solution.
Thanks and all the best,
Dee
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-05 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 12:46 [FFmpeg-devel] [PATCH] avformat/avformat: Schedule AVOutputFormat.data_codec for removal Andreas Rheinhardt
2022-05-05 12:54 ` Diederick C. Niehorster
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git