Merge commit '44386aaad870cbd80ae0d08247ebc663476446ff'

* commit '44386aaad870cbd80ae0d08247ebc663476446ff':
  cdg: Forward error from avio_size() in read_header() function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-07-11 00:49:52 +02:00
commit 20ad2152dd
1 changed files with 3 additions and 2 deletions

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