mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
lavc: warn when impossible to adjust timestamps for skipped samples.
It is likely to happen if pkt_timebase was not set.
This commit is contained in:
parent
11ce1cf9a7
commit
0e18ac5611
@ -1668,6 +1668,8 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
|
||||
frame->pkt_pts += av_rescale_q(avctx->internal->skip_samples,(AVRational){1, avctx->sample_rate}, avctx->pkt_timebase);
|
||||
if(frame->pkt_dts!=AV_NOPTS_VALUE)
|
||||
frame->pkt_dts += av_rescale_q(avctx->internal->skip_samples,(AVRational){1, avctx->sample_rate}, avctx->pkt_timebase);
|
||||
} else {
|
||||
av_log(avctx, AV_LOG_WARNING, "Could not update timestamps for skipped samples.\n");
|
||||
}
|
||||
av_log(avctx, AV_LOG_DEBUG, "skip %d/%d samples\n",
|
||||
avctx->internal->skip_samples, frame->nb_samples);
|
||||
|
Loading…
Reference in New Issue
Block a user