GNOME Bugzilla – Bug 765498
qtdemux: Fix key_time in gst_qtdemux_adjust_seek()
Last modified: 2017-01-09 13:52:51 UTC
time in segment should be PTS based (not DTS).
Created attachment 326632 [details] [review] qtdemux: Fix key_time in gst_qtdemux_adjust_seek()
Created attachment 326633 [details] Log with proposed patch
Created attachment 326634 [details] Log without proposed patch
- In case of KEY_UNIT seeking, qtdemux finds offset of keyframe. qtdemux.c:1483:gst_qtdemux_perform_seek:<qtdemux0>^[[00m seeking to 0:04:48.360944166 . . qtdemux.c:1170:gst_qtdemux_find_keyframe:<qtdemux0>^[[00m searching for keyframe index before index 6913 gave 6816 qtdemux.c:1314:gst_qtdemux_adjust_seek:<qtdemux0>^[[00m keyframe at 6816 with time 0:04:44.284000000 at offset 112041550 - Then, qtdemux do similar thing when state_movie. But, due to incorrect segment value (results from gst_qtdemux_adjust_seek() function), going back further.... qtdemux.c:4519:gst_qtdemux_activate_segment:<qtdemux0:video_0>^[[00m moving data pointer to 0:04:44.284000000, index: 6814, pts 0:04:44.284000000 qtdemux.c:1170:gst_qtdemux_find_keyframe:<qtdemux0>^[[00m searching for keyframe index before index 6814 gave 6775 qtdemux.c:4572:gst_qtdemux_activate_segment:<qtdemux0:video_0>^[[00m moving backwards to keyframe at 6775 (pts 0:04:42.657000000 dts 0:04:42.574000000 ) - With this patch, the bug can be fixed qtdemux.c:1483:gst_qtdemux_perform_seek:<qtdemux0>^[[00m seeking to 0:04:48.150215000 . . qtdemux.c:1170:gst_qtdemux_find_keyframe:<qtdemux0>^[[00m searching for keyframe index before index 6908 gave 6816 qtdemux.c:1314:gst_qtdemux_adjust_seek:<qtdemux0>^[[00m keyframe at 6816 with time 0:04:44.367000000 at offset 112041550 . . qtdemux.c:4519:gst_qtdemux_activate_segment:<qtdemux0:video_0>^[[00m moving data pointer to 0:04:44.367000000, index: 6816, pts 0:04:44.367000000 qtdemux.c:1170:gst_qtdemux_find_keyframe:<qtdemux0>^[[00m searching for keyframe index before index 6816 gave 6816 qtdemux.c:4572:gst_qtdemux_activate_segment:<qtdemux0:video_0>^[[00m moving backwards to keyframe at 6816 (pts 0:04:44.367000000 dts 0:04:44.284000000 )
Thanks! Pushed to master