Browse Source

cdg: Forward error from avio_size() in read_header() function

Signed-off-by: Diego Biurrun <diego@biurrun.de>
tags/n2.3
Nidhi Makhijani Diego Biurrun 11 years ago
parent
commit
44386aaad8
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavformat/cdg.c

+ 3
- 2
libavformat/cdg.c View File

@@ -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;
}



Loading…
Cancel
Save