Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 01/13] avformat/mp3enc: Improve query_codec
@ 2024-03-20  2:07 Andreas Rheinhardt
  2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 02/13] libavformat/westwood_audenc: Use proper logcontext Andreas Rheinhardt
                   ` (12 more replies)
  0 siblings, 13 replies; 15+ messages in thread
From: Andreas Rheinhardt @ 2024-03-20  2:07 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Signal that anything except MP3 and the ID3V2 attached pic types
are forbidden.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/mp3enc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index cb250a46ca..4a02a45069 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -495,12 +495,16 @@ static int mp3_write_trailer(struct AVFormatContext *s)
 static int query_codec(enum AVCodecID id, int std_compliance)
 {
     const CodecMime *cm= ff_id3v2_mime_tags;
+
+    if (id == AV_CODEC_ID_MP3)
+        return 1;
+
     while(cm->id != AV_CODEC_ID_NONE) {
         if(id == cm->id)
             return MKTAG('A', 'P', 'I', 'C');
         cm++;
     }
-    return -1;
+    return 0;
 }
 
 static const AVOption options[] = {
-- 
2.40.1

_______________________________________________
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] 15+ messages in thread

end of thread, other threads:[~2024-03-22 12:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20  2:07 [FFmpeg-devel] [PATCH 01/13] avformat/mp3enc: Improve query_codec Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 02/13] libavformat/westwood_audenc: Use proper logcontext Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 03/13] avformat/mux: Rename FF_FMT_ALLOW_FLUSH->FF_OFMT_FLAG_ALLOW_FLUSH Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 04/13] avformat/codec2: Don't allocate Codec2Context for muxer Andreas Rheinhardt
2024-03-20 11:23   ` Tomas Härdin
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 05/13] avformat/amr: Move write_header closer to muxer definition Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 06/13] avformat/mux_utils: Don't report that AV_CODEC_ID_NONE can be muxed Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 07/13] fate/filter-audio: Don't use pcm output for channelsplit test Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 08/13] avformat/mux: Add flag for "not more than one stream of each type" Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 09/13] avformat: Enforce one-stream limit where appropriate Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 10/13] avformat/mux: Add flag for "only default codecs allowed" Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 11/13] avformat/ttmlenc: Avoid unnecessary block Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 12/13] avformat: Enforce codec_id where appropriate Andreas Rheinhardt
2024-03-20  2:12 ` [FFmpeg-devel] [PATCH 13/13] avformat: Make init function out of write_header functions if possible Andreas Rheinhardt
2024-03-22 12:13 ` [FFmpeg-devel] [PATCH 01/13] avformat/mp3enc: Improve query_codec Andreas Rheinhardt

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