|
|
@@ -46,10 +46,11 @@ static int read_header(AVFormatContext *s) |
|
|
|
avpriv_set_pts_info(vst, 32, 1, 300); |
|
|
|
|
|
|
|
ret = avio_size(s->pb); |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
if (ret < 0) { |
|
|
|
av_log(s, AV_LOG_WARNING, "Cannot calculate duration as file size cannot be determined\n"); |
|
|
|
} else |
|
|
|
vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300); |
|
|
|
|
|
|
|
vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|