[FFmpeg-devel] [RFC] Are those workarounds really needed?
Måns Rullgård
mans
Sun Feb 13 01:37:27 CET 2011
Luca Barbato <lu_zero at gentoo.org> writes:
> Today I got a strange bug report, somebody was using ffmpeg since old
> age and it was working quite fine for his purposes, today he updated and
> got a severe desync.
>
> I got a sample and it broke ffplay/ffmpeg severely while it plays
> correctly on vlc.
>
> I dug a bit and I found the culprit (patch attached).
>
> Now, is that really needed?
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 870a287..25fba4c 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -950,10 +950,10 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
> // some mpeg2 in mpeg-ps lack dts (issue171 / input_file.mpg)
> // we take the conservative approach and discard both
> // Note, if this is misbehaving for a H.264 file then possibly presentation_delayed is not set correctly.
> - if(delay==1 && pkt->dts == pkt->pts && pkt->dts != AV_NOPTS_VALUE && presentation_delayed){
> +/* if(delay==1 && pkt->dts == pkt->pts && pkt->dts != AV_NOPTS_VALUE && presentation_delayed){
> av_log(s, AV_LOG_DEBUG, "invalid dts/pts combination\n");
> pkt->dts= pkt->pts= AV_NOPTS_VALUE;
> - }
> + }*/
>
> if (pkt->duration == 0) {
> compute_frame_duration(&num, &den, st, pc, pkt);
Did you figure out why this causes problems with your sample? Can you
share the sample?
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list