[FFmpeg-trac] #3221(undetermined:new): best effort time stamp is wrong after av_seek_frame is called.
FFmpeg
trac at avcodec.org
Thu Dec 12 23:50:32 CET 2013
#3221: best effort time stamp is wrong after av_seek_frame is called.
-------------------------------------+-------------------------------------
Reporter: hxuanyu | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: unspecified | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by hxuanyu):
Hi I added avcodec_flush_buffers before calling av_seek_frame, but result
still seems incorrect, sorry the log format is not so good, you can check
attached file log1.
When I seek to dts 3, and continue to read. I expected to get a full frame
straight away. But in fact until I read out 5 packets I could get the
first full frame.
Line 463: 00:00:32.620 MAIN rhbc73 Packet [0] dts = 0, pts =
-9223372036854775808, KEY =1
Line 465: 00:00:32.620 MAIN rhbc73 **************** NO
complete frame
Line 469: 00:00:32.620 MAIN rhbc73 Packet [1] dts = 1, pts =
-9223372036854775808, KEY =1
Line 471: 00:00:32.620 MAIN rhbc73 **************** NO
complete frame
Line 473: 00:00:32.620 MAIN rhbc73 Packet [2] dts = 2, pts =
-9223372036854775808, KEY =0
Line 475: 00:00:32.620 MAIN rhbc73 **************** NO
complete frame
Line 477: 00:00:32.620 MAIN rhbc73 Packet [3] dts = 3, pts =
-9223372036854775808, KEY =1
Line 479: 00:00:32.620 MAIN rhbc73 **************** NO
complete frame
Line 481: 00:00:32.620 MAIN rhbc73 Packet [4] dts = 4, pts =
-9223372036854775808, KEY =1
Line 483: 00:00:32.620 MAIN rhbc73 =======
got a complete frame, pkt_dts = 0, best effort time stamp = 0
Line 485: 00:00:32.620 MAIN rhbc73 Packet [5] dts = 5, pts =
-9223372036854775808, KEY =0
Line 487: 00:00:32.620 MAIN rhbc73 =======
got a complete frame, pkt_dts = 1, best effort time stamp = 1
Line 489: 00:00:32.620 MAIN rhbc73 Packet [6] dts = 6, pts =
-9223372036854775808, KEY =0
Line 491: 00:00:32.620 MAIN rhbc73 =======
got a complete frame, pkt_dts = 2, best effort time stamp = 2
Line 493: 00:00:32.620 MAIN rhbc73 Packet [7] dts = 7, pts =
-9223372036854775808, KEY =0
Line 495: 00:00:32.635 MAIN rhbc73 =======
got a complete frame, pkt_dts = 3, best effort time stamp = 3
Line 497: 00:00:32.635 MAIN rhbc73 Packet [8] dts = 8, pts =
-9223372036854775808, KEY =1
Line 499: 00:00:32.635 MAIN rhbc73 =======
got a complete frame, pkt_dts = 4, best effort time stamp = 4
Line 501: 00:00:32.635 MAIN rhbc73 Packet [9] dts = 9, pts =
-9223372036854775808, KEY =0
Line 503: 00:00:32.635 MAIN rhbc73 =======
got a complete frame, pkt_dts = 5, best effort time stamp = 5
Line 505: 00:00:32.635 MAIN rhbc73 Packet [10] dts = 10, pts =
-9223372036854775808, KEY =0
Line 507: 00:00:32.635 MAIN rhbc73 =======
got a complete frame, pkt_dts = 6, best effort time stamp = 6
Line 509: 00:00:32.635 MAIN rhbc73 now try to see to packet
where dts = 3
Line 511: 00:00:32.635 MAIN rhbc73 seek succeed, then continue
to read
Line 515: 00:00:32.635 MAIN rhbc73 Packet [11] dts = 3, pts =
-9223372036854775808, KEY =1
Line 517: 00:00:32.635 MAIN rhbc73 **************** NO
complete frame
Line 521: 00:00:32.635 MAIN rhbc73 Packet [12] dts = 4, pts =
-9223372036854775808, KEY =1
Line 523: 00:00:32.635 MAIN rhbc73 **************** NO
complete frame
Line 527: 00:00:32.635 MAIN rhbc73 Packet [13] dts = 5, pts =
-9223372036854775808, KEY =0
Line 529: 00:00:32.635 MAIN rhbc73 **************** NO
complete frame
Line 531: 00:00:32.635 MAIN rhbc73 Packet [14] dts = 6, pts =
-9223372036854775808, KEY =0
Line 533: 00:00:32.651 MAIN rhbc73 **************** NO
complete frame
Line 537: 00:00:32.651 MAIN rhbc73 Packet [15] dts = 7, pts =
-9223372036854775808, KEY =0
Line 539: 00:00:32.651 MAIN rhbc73 =======
got a complete frame, pkt_dts = 3, best effort time stamp = 3
Line 541: 00:00:32.651 MAIN rhbc73 Packet [16] dts = 8, pts =
-9223372036854775808, KEY =1
Line 543: 00:00:32.651 MAIN rhbc73 =======
got a complete frame, pkt_dts = 4, best effort time stamp = 4
Line 547: 00:00:32.651 MAIN rhbc73 Packet [17] dts = 9, pts =
-9223372036854775808, KEY =0
Line 549: 00:00:32.651 MAIN rhbc73 =======
got a complete frame, pkt_dts = 5, best effort time stamp = 5
Line 553: 00:00:32.651 MAIN rhbc73 Packet [18] dts = 10, pts =
-9223372036854775808, KEY =0
Line 555: 00:00:32.651 MAIN rhbc73 =======
got a complete frame, pkt_dts = 6, best effort time stamp = 6
Line 557: 00:00:32.651 MAIN rhbc73 Packet [19] dts = 11, pts =
-9223372036854775808, KEY =0
Line 559: 00:00:32.651 MAIN rhbc73 =======
got a complete frame, pkt_dts = 7, best effort time stamp = 7
Line 563: 00:00:32.651 MAIN rhbc73 Packet [20] dts = 12, pts =
-9223372036854775808, KEY =1
Line 565: 00:00:32.651 MAIN rhbc73 =======
got a complete frame, pkt_dts = 8, best effort time stamp = 8
Line 567: 00:00:32.651 MAIN rhbc73 Packet [21] dts = 13, pts =
-9223372036854775808, KEY =0
Line 569: 00:00:32.651 MAIN rhbc73 =======
got a complete frame, pkt_dts = 9, best effort time stamp = 9
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3221#comment:3>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list