mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
mxfdemux: fix keyframe detection in index
An index entry should be considered as a keyframe if the flags allow a random access only. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2173>
This commit is contained in:
parent
51e96fd2c3
commit
c32f455b7b
1 changed files with 7 additions and 2 deletions
|
@ -3796,8 +3796,13 @@ collect_index_table_segments (GstMXFDemux * demux)
|
|||
}
|
||||
|
||||
index->offset = offset;
|
||||
index->keyframe = ! !(segment->index_entries[i].flags & 0x80)
|
||||
|| (segment->index_entries[i].key_frame_offset == 0);
|
||||
/* EG41-2004 Table 9: 0x80 = Random access */
|
||||
/* random_access is more reliable to determine if the index is
|
||||
* a key-frame than checking the keyframe_offset or the frame type flag.
|
||||
* See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2173#note_900580
|
||||
* for more details.
|
||||
*/
|
||||
index->keyframe = ! !(segment->index_entries[i].flags & 0x80);
|
||||
index->dts = pts_i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue