avformat/rmdec: fix support for 0 sized mdpr
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 26 Mar 2015 01:02:18 +0000 (02:02 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 28 Mar 2015 10:59:05 +0000 (11:59 +0100)
Fixes Ticket4393

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit df43d03731c138bb113a66fd9c1b4d8cf2d879e5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rmdec.c

index 727d065..3506d07 100644 (file)
@@ -320,6 +320,8 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb,
 
     if (codec_data_size > INT_MAX)
         return AVERROR_INVALIDDATA;
+    if (codec_data_size == 0)
+        return 0;
 
     avpriv_set_pts_info(st, 64, 1, 1000);
     codec_pos = avio_tell(pb);