mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
mpegvideoparse: Update caps when the sequence header changes
Fixes bug #612687.
This commit is contained in:
parent
6631f50d59
commit
46abe733c6
1 changed files with 14 additions and 18 deletions
|
@ -432,25 +432,21 @@ mpegvideoparse_drain_avail (MpegVideoParse * mpegvideoparse)
|
|||
cur->length, picture_start_code_name (cur->first_pack_type),
|
||||
cur->flags);
|
||||
|
||||
/* Don't start pushing out buffers until we've seen a sequence header */
|
||||
if (mpegvideoparse->seq_hdr.mpeg_version == 0) {
|
||||
if (cur->flags & MPEG_BLOCK_FLAG_SEQUENCE) {
|
||||
/* Found a sequence header */
|
||||
if (!mpegvideoparse_handle_sequence (mpegvideoparse, buf)) {
|
||||
GST_DEBUG_OBJECT (mpegvideoparse,
|
||||
"Invalid sequence header. Dropping buffer.");
|
||||
gst_buffer_unref (buf);
|
||||
buf = NULL;
|
||||
}
|
||||
} else {
|
||||
if (buf) {
|
||||
GST_DEBUG_OBJECT (mpegvideoparse,
|
||||
"No sequence header yet. Dropping buffer of %u bytes",
|
||||
GST_BUFFER_SIZE (buf));
|
||||
gst_buffer_unref (buf);
|
||||
buf = NULL;
|
||||
}
|
||||
if (cur->flags & MPEG_BLOCK_FLAG_SEQUENCE) {
|
||||
/* Found a sequence header */
|
||||
if (!mpegvideoparse_handle_sequence (mpegvideoparse, buf)) {
|
||||
GST_DEBUG_OBJECT (mpegvideoparse,
|
||||
"Invalid sequence header. Dropping buffer.");
|
||||
gst_buffer_unref (buf);
|
||||
buf = NULL;
|
||||
}
|
||||
} else if (mpegvideoparse->seq_hdr.mpeg_version == 0 && buf) {
|
||||
/* Don't start pushing out buffers until we've seen a sequence header */
|
||||
GST_DEBUG_OBJECT (mpegvideoparse,
|
||||
"No sequence header yet. Dropping buffer of %u bytes",
|
||||
GST_BUFFER_SIZE (buf));
|
||||
gst_buffer_unref (buf);
|
||||
buf = NULL;
|
||||
}
|
||||
|
||||
if (buf != NULL) {
|
||||
|
|
Loading…
Reference in a new issue