Patch for B-Frame seeking problems#6558
Conversation
|
I just compiled against FFMPEG 3.0.2 and it also compiles so I don't understand which version was used by the automatic builder. That method comes from 'libavutil/frame.h' and has been there since FFMPEG 1.1.5. |
|
Ubuntu 14.04 uses "libav" and there is no method with this name. Difference between libav and ffmpeg in the "micro" version number (0+ vs 100+): |
|
Ah of course. I'll modify the patch. Thanks |
|
Also should I submit a separate patch to have this propagated in the 3.X branch? |
|
@lletourn, thanks for the patch! the master is the right branch to target. We won't patch already made releases, but your patch will go to OpenCV 3.2 |
|
@lletourn Could you please squash commits into one. |
|
If I want to write a test but need to add a video in the test_data Thanks
|
|
@alalek Don't you have the option to squash commits when merging the pull request to the main repo? |
|
We don't use GitHub "Merge" button because we use different merge commit message and more strict policies about patched integration. |
|
Thanks for the explanation it makes a lot of sense. I squashed the commits and pushed. |
|
Thanks! 👍 |
|
Thanks for the fix 👍 ! |
|
My pleasure. |
resolves #4890
What does this PR change?
This change resolved the long standing issue #4890
I added on the issue a way to reproduce the bug and detect the problem. Here is a patch that fixes it.
I tried this modified code on x264 encoded videos with and without b-frames
I tried it on an xvid avi
I tried it on a QTRLE mov
They all worked.
This being said, I checked the git log on the file and I don't see any corner cases that would explain why packet.pts was used instead of picture->pkt_pts. In theory containers without dts or without pts should work with this code.
I also admit that I don't understand the use of 'first_frame_number' (not a corner case either).
Using best_effort_timestamp to resolve the current frame number makes it so decrementing first_frame_number from dts_to_frame_number is not needed. Is there something I'm missing?
I tried this with opencv compiled against ffmpeg 2.8.6 and 2.8.7
Thanks