diff mbox series

[FFmpeg-devel,03/14] avformat/mp3dec: Simplify checking for no-metadata

Message ID PR3PR03MB6665C775E883694EB882986D8FD59@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 8ab5bf512a5705975f698f799979a77d748a7313
Headers show
Series [FFmpeg-devel,01/14] Revert "avfilter/af_silenceremove: fix processing of periods > 1"
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/configureppc warning Failed to apply patch

Commit Message

Andreas Rheinhardt Sept. 9, 2021, 3:57 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
If it were documented that a non-NULL AVDictionary is always nonempty
this could be simplified. But I don't know whether we want to document
that.

 libavformat/mp3dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 9205abebc4..72c049edaf 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -384,7 +384,7 @@  static int mp3_read_header(AVFormatContext *s)
     ffiocontext(s->pb)->maxsize = -1;
     off = avio_tell(s->pb);
 
-    if (!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX))
+    if (!av_dict_count(s->metadata))
         ff_id3v1_read(s);
 
     if (s->pb->seekable & AVIO_SEEKABLE_NORMAL)