[FFmpeg-devel] [PATCH 5/5] utils: In compute_pkt_fields(), use st->cur_dts if set

Tomas Härdin tomas.hardin at codemill.se
Wed Mar 7 14:17:23 CET 2012


The problem this patch is trying to fix:
* compute_pkt_fields() clears pkt->dts at lavf/utils.c:969.
* further down on line 1023 pkt->dts gets set to st->last_IP_pts
* this somehow leads to pkt->dts = 0 twice in a row
* code somewhere somehow gets both pkt->dts = pkt->pts = -1

I notice that st->cur_dts will have the proper value for pkt->dts, so
thsi patch tries to use that. Unfortunately this breaks FATE. I'm
somewhat at a loss here.

To test:
$ ./ffprobe -show_packets sony-d10.mxf|grep -A5 video|grep -e pts= -e
dts=|head

ffmpeg/master:
pts=N/A
dts=0
pts=N/A
dts=1
pts=N/A
dts=2
pts=N/A
dts=3
pts=N/A
dts=4

After PATCH 4/5:
pts=-1
dts=-1
pts=1
dts=0
pts=2
dts=1
pts=3
dts=2
pts=4
dts=3

After this patch:
pts=0
dts=0
pts=1
dts=1
pts=2
dts=2
pts=3
dts=3
pts=4
dts=4

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-utils-In-compute_pkt_fields-use-st-cur_dts-if-set.patch
Type: text/x-patch
Size: 1269 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120307/5371d03f/attachment.bin>


More information about the ffmpeg-devel mailing list