[SCM] libav/experimental: cdg: Forward error from avio_size() in read_header() function

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:03:49 UTC 2014


The following commit has been merged in the experimental branch:
commit 44386aaad870cbd80ae0d08247ebc663476446ff
Author: Nidhi Makhijani <nidhimj22 at gmail.com>
Date:   Thu Jul 10 13:44:51 2014 +0530

    cdg: Forward error from avio_size() in read_header() function
    
    Signed-off-by: Diego Biurrun <diego at biurrun.de>

diff --git a/libavformat/cdg.c b/libavformat/cdg.c
index 54ad17e..e699691 100644
--- a/libavformat/cdg.c
+++ b/libavformat/cdg.c
@@ -46,9 +46,10 @@ static int read_header(AVFormatContext *s)
     avpriv_set_pts_info(vst, 32, 1, 300);
 
     ret = avio_size(s->pb);
-    if (ret > 0)
-        vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300);
+    if (ret < 0)
+        return ret;
 
+    vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300);
     return 0;
 }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list