GNOME Bugzilla – Bug 722288
avviddec: mark key frames as sync points
Last modified: 2014-02-04 11:42:12 UTC
Decoded video frames are not marked as sync points. This could be useful to mark buffers as corrupted, in the base videodecoder, if no sync point has been received before.
Created attachment 266384 [details] [review] mark key frames as sync points A proposal to mark frames as sync point if they are a key frame.
How is that useful currently? The flag will be set but just be ignored by the base class at that point IIRC?
(In reply to comment #2) > How is that useful currently? The flag will be set but just be ignored by the > base class at that point IIRC? Just filed bug 722290.
Isn't the flag already set on the GstVideoCodecFrame based on the flags on the incoming GstBuffer ?
Yes, unless something else is wrong or it wasn't properly set before.
(In reply to comment #4) > Isn't the flag already set on the GstVideoCodecFrame based on the flags on the > incoming GstBuffer ? If I remove this patch and keep the one in bug 722290, all buffers as marked as corrupted (as no sync point has been received). I'll double check where this sync point flag is dropped.
I just filed a bug to libav to see if it is possible to add information to know if frames can be decoded even the reference key frame is not present. https://bugzilla.libav.org/show_bug.cgi?id=628
Comment on attachment 266384 [details] [review] mark key frames as sync points As discussed this seems rather like a workaround for a problem elsewhere. The flag should already have been set on the input side of the encoder. Need to check why it gets lost
(In reply to comment #8) > (From update of attachment 266384 [details] [review]) > As discussed this seems rather like a workaround for a problem elsewhere. The > flag should already have been set on the input side of the encoder. Need to > check why it gets lost This seems to work fine. However, when using the intra-refresh option in x264, there are no key frames and all encoded frames are considered delta units, so sync point is not set on any frame. libav considers the frame with the first intra block column to be a key frame (as set in AVFrame->key_frame. AVFrame->picture_type still says it's a p-frame). So, I guess we could mark this as INVALID?
Ah, and h264parse sets the DELTA flag on all frames for intra-refresh streams? It should probably do the same as libav here, even if it is arguably not strictly correct.
(In reply to comment #10) > Ah, and h264parse sets the DELTA flag on all frames for intra-refresh streams? Yes, it seems that way. I haven't tried h264parse, but rtph264depay seems to have the same "problem". > It should probably do the same as libav here, even if it is arguably not > strictly correct. I'll see if I find some time to look at this.
Let's close this then. Can you file a new bug on h264parse/rtph264depay and describe the situation there and what should be done?