[FFmpeg-cvslog] cdg: Forward error from avio_size() in read_header() function
Nidhi Makhijani
git at videolan.org
Fri Jul 11 01:15:28 CEST 2014
ffmpeg | branch: master | Nidhi Makhijani <nidhimj22 at gmail.com> | Thu Jul 10 14:02:51 2014 +0530| [44386aaad870cbd80ae0d08247ebc663476446ff] | committer: Diego Biurrun
cdg: Forward error from avio_size() in read_header() function
Signed-off-by: Diego Biurrun <diego at biurrun.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=44386aaad870cbd80ae0d08247ebc663476446ff
---
libavformat/cdg.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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;
}
More information about the ffmpeg-cvslog
mailing list