mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
cdg: Forward error from avio_size() in read_header() function
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
parent
5adcef9c1b
commit
44386aaad8
@ -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…
Reference in New Issue
Block a user