[FFmpeg-devel] [PATCH] In get_video_frame(), use frame->pkt_pts rather than the deprecated reordered_opaque API, which is deprecated for this specific use.

Alexander Strange astrange
Thu Jan 27 01:25:34 CET 2011


On Jan 26, 2011, at 7:15 PM, Stefano Sabatini wrote:

> On date Saturday 2011-01-22 20:54:29 +0100, Michael Niedermayer encoded:
>> On Sat, Jan 22, 2011 at 06:29:01PM +0100, Stefano Sabatini wrote:
>>> On date Sunday 2011-01-16 19:29:00 +0100, Michael Niedermayer encoded:
>>>> On Sun, Jan 16, 2011 at 06:41:12PM +0100, Stefano Sabatini wrote:
>>>>> ---
>>>>> ffplay.c |    5 ++---
>>>>> 1 files changed, 2 insertions(+), 3 deletions(-)
>>>> 
>>>> ok if you added a av_log and diffed the output to make sure the values stay the
>>>> same.
>>> 
>>> With the attached patch:
>>> 
>>> $ ffplay -loglevel debug slow.flv -nostats
>>> [...]
>>> pkt_pts:0 reordered_opaque:0
>>> pkt_pts:1201 reordered_opaque:1201
>>> pkt_pts:1235 reordered_opaque:1235
>>> pkt_pts:1268 reordered_opaque:1268
>>> pkt_pts:1301 reordered_opaque:1301
>>> pkt_pts:1335 reordered_opaque:1335
>>> pkt_pts:1368 reordered_opaque:1368
>>> pkt_pts:1401 reordered_opaque:1401
>>> pkt_pts:1435 reordered_opaque:1435
>>> pkt_pts:1468 reordered_opaque:1468
>>> pkt_pts:1502 reordered_opaque:1502
>>> 
>>> $ ffplay -loglevel debug -f video4linux2 /dev/video0 -nostats
>>> [...]
>>> pkt_pts:0 reordered_opaque:1295716878360213
>>> pkt_pts:0 reordered_opaque:1295716878392241
>>> pkt_pts:0 reordered_opaque:1295716878424240
>>> pkt_pts:0 reordered_opaque:1295716878460225
>>> pkt_pts:0 reordered_opaque:1295716878492244
>>> pkt_pts:0 reordered_opaque:1295716878524256
>>> pkt_pts:0 reordered_opaque:1295716878560294
>>> pkt_pts:0 reordered_opaque:1295716878600246
>>> pkt_pts:0 reordered_opaque:1295716878648249
>>> pkt_pts:0 reordered_opaque:1295716878708263
>>> pkt_pts:0 reordered_opaque:1295716878780285
>>> pkt_pts:0 reordered_opaque:1295716878848275
>>> pkt_pts:0 reordered_opaque:1295716878940307
>>> pkt_pts:0 reordered_opaque:1295716879040322
>>> pkt_pts:0 reordered_opaque:1295716879160314
>>> pkt_pts:0 reordered_opaque:1295716879300289
>>> pkt_pts:0 reordered_opaque:1295716879460302
>>> pkt_pts:0 reordered_opaque:1295716879640305
>>> pkt_pts:0 reordered_opaque:1295716879832292
>>> 
>>> I noticed the problem today when debugging the movie source, I can see in
>>> avcodec_decode_video2() that the pkt_dts is set:
>>>        picture->pkt_dts= avpkt->dts;
>>> 
>>> but not pkt_pts.
>>> 
>>> I'll have a further look.
>> 
>> raw_decode() doesnt use get_buffer() i guess and thus pkt_pts isnt passed
>> over. Change raw_decode to pass it (1 line) is one possible fix.
> 
> Tried with ffmpeg this time, make test gives alot of errors.
> 
> Too tired to check now though, and maybe I'm too tired and so I missed
> something obvious...

Pass pkt_pts through in raw.c (rawdec.c?) in the same way reordered_opaque is passed through.

I posted an equivalent patch to the one you attached in the mt thread, but they're the same so it doesn't matter which is applied.

> 
>> btw, on which of the 2 sides are you?
>> I cant review for the others as iam not a new maintainer...
> 
> Until we don't know what's the meaning of maintainer according to the
> new gov...
> -- 
> FFmpeg = Friendly Formidable Mastering Practical Elaborated Guru
> <0005-Make-ffmpeg.c-use-picture.pkt_pts-in-place-of-reorde.patch>_______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel




More information about the ffmpeg-devel mailing list