diff options
author | Nidhi Makhijani <nidhimj22@gmail.com> | 2014-07-10 13:44:51 +0530 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-07-10 12:38:54 -0700 |
commit | 44386aaad870cbd80ae0d08247ebc663476446ff (patch) | |
tree | c86b3fbe3c6ed4a4eec5fae6ca19dde4b0996b04 | |
parent | 5adcef9c1bf701ba2dd43363ae983ba6d74bdb9a (diff) | |
download | ffmpeg-44386aaad870cbd80ae0d08247ebc663476446ff.tar.gz |
cdg: Forward error from avio_size() in read_header() function
Signed-off-by: Diego Biurrun <diego@biurrun.de>
-rw-r--r-- | libavformat/cdg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/cdg.c b/libavformat/cdg.c index 54ad17e3b0..e699691925 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; } |