ffmpeg | branch: release/4.4 | Andreas Rheinhardt 
<[email protected]> | Mon Sep 23 23:23:10 2019 +0200| 
[9f011f0876b1bb1fba0f776539a98e71f5315dd6] | committer: Andreas Rheinhardt

avformat/webmdashenc: Don't pass NULL to memcmp

Affects the FATE-tests webm-dash-manifest-unaligned-video-streams,
webm-dash-manifest and webm-dash-manifest-representations.

Signed-off-by: Andreas Rheinhardt <[email protected]>
(cherry picked from commit a42c47b77feda837a966aa96569ed8a2553b1c36)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f011f0876b1bb1fba0f776539a98e71f5315dd6
---

 libavformat/webmdashenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
index 332d0466e1..1304c1a8c3 100644
--- a/libavformat/webmdashenc.c
+++ b/libavformat/webmdashenc.c
@@ -155,7 +155,8 @@ static int bitstream_switching(AVFormatContext *s, const 
AdaptationSet *as)
             !av_strstart(track_num->value, gold_track_num->value, NULL) ||
             gold_par->codec_id != par->codec_id ||
             gold_par->extradata_size != par->extradata_size ||
-            memcmp(gold_par->extradata, par->extradata, par->extradata_size)) {
+            (par->extradata_size > 0 &&
+             memcmp(gold_par->extradata, par->extradata, 
par->extradata_size))) {
             return 0;
         }
     }

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to