[FFmpeg-devel] [PATCH] use reordered_opaque in ffmpeg.c

Michael Niedermayer michaelni
Mon Jun 21 20:28:50 CEST 2010


On Mon, Jun 21, 2010 at 03:34:19AM -0700, Alexander Strange wrote:
> 
> On Jun 20, 2010, at 3:50 AM, Michael Niedermayer wrote:
> 
> > On Sun, Jun 20, 2010 at 01:58:55AM -0700, Alexander Strange wrote:
[...]
> > also the check from ffplay should be used probably instead of the last_pts
> > stuff
> > i mean:
> >        if (got_picture) {
> >            if(pkt->dts != AV_NOPTS_VALUE){
> >                is->faulty_dts += pkt->dts <= is->last_dts_for_fault_detection;
> >                is->last_dts_for_fault_detection= pkt->dts;
> >            }
> >            if(frame->reordered_opaque != AV_NOPTS_VALUE){
> >                is->faulty_pts += frame->reordered_opaque <= is->last_pts_for_fault_detection;
> >                is->last_pts_for_fault_detection= frame->reordered_opaque;
> >            }
> >        }
> > 
> >        if(   (   decoder_reorder_pts==1
> >               || (decoder_reorder_pts && is->faulty_pts<is->faulty_dts)
> >               || pkt->dts == AV_NOPTS_VALUE)
> >           && frame->reordered_opaque != AV_NOPTS_VALUE)
> >            *pts= frame->reordered_opaque;
> >        else if(pkt->dts != AV_NOPTS_VALUE)
> >            *pts= pkt->dts;
> >        else
> >            *pts= 0;
> > 
> > This could ideally of course be moved into shared code (a macro if we dont
> > find a solution for accessing the fields of the struct cleaner)
> 
> Hmm, ffmpeg and ffplay unfortunately don't share data structures besides cmd-line parsing.
> This could be extracted and put in cmdutils, I guess.

a new struct could be added possibly


> 
> Are there any files where faulty_dts > faulty_pts?

id be surprised if there are not


> I have this one with faulty_dts==faulty_pts:
> http://samples.mplayerhq.hu/archive/container/mpeg/mpeg%2bmpeg2video%2bac3%2b%2bnon_monotone_timestamps.mpg

do you think either of them is better than the other?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100621/ad35fb19/attachment.pgp>



More information about the ffmpeg-devel mailing list