Commit 20ad2152 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '44386aaa'

* commit '44386aaa':
  cdg: Forward error from avio_size() in read_header() function
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ddea3b71 44386aaa
...@@ -46,9 +46,10 @@ static int read_header(AVFormatContext *s) ...@@ -46,9 +46,10 @@ static int read_header(AVFormatContext *s)
avpriv_set_pts_info(vst, 32, 1, 300); avpriv_set_pts_info(vst, 32, 1, 300);
ret = avio_size(s->pb); ret = avio_size(s->pb);
if (ret > 0) if (ret < 0)
vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300); return ret;
vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment