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,8 +432,6 @@ mpegvideoparse_drain_avail (MpegVideoParse * mpegvideoparse)
|
||||||
cur->length, picture_start_code_name (cur->first_pack_type),
|
cur->length, picture_start_code_name (cur->first_pack_type),
|
||||||
cur->flags);
|
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) {
|
if (cur->flags & MPEG_BLOCK_FLAG_SEQUENCE) {
|
||||||
/* Found a sequence header */
|
/* Found a sequence header */
|
||||||
if (!mpegvideoparse_handle_sequence (mpegvideoparse, buf)) {
|
if (!mpegvideoparse_handle_sequence (mpegvideoparse, buf)) {
|
||||||
|
@ -442,16 +440,14 @@ mpegvideoparse_drain_avail (MpegVideoParse * mpegvideoparse)
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (mpegvideoparse->seq_hdr.mpeg_version == 0 && buf) {
|
||||||
if (buf) {
|
/* Don't start pushing out buffers until we've seen a sequence header */
|
||||||
GST_DEBUG_OBJECT (mpegvideoparse,
|
GST_DEBUG_OBJECT (mpegvideoparse,
|
||||||
"No sequence header yet. Dropping buffer of %u bytes",
|
"No sequence header yet. Dropping buffer of %u bytes",
|
||||||
GST_BUFFER_SIZE (buf));
|
GST_BUFFER_SIZE (buf));
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buf != NULL) {
|
if (buf != NULL) {
|
||||||
/* If outputting a PICTURE packet, we can calculate the duration
|
/* If outputting a PICTURE packet, we can calculate the duration
|
||||||
|
|
Loading…
Reference in a new issue