mpegvideoparse: Update caps when the sequence header changes

Fixes bug #612687.
This commit is contained in:
Raimo Järvi 2010-03-13 06:03:32 +01:00 committed by Sebastian Dröge
parent 6631f50d59
commit 46abe733c6

View file

@ -432,8 +432,6 @@ 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)) {
@ -442,16 +440,14 @@ mpegvideoparse_drain_avail (MpegVideoParse * mpegvideoparse)
gst_buffer_unref (buf);
buf = NULL;
}
} else {
if (buf) {
} 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) {
/* If outputting a PICTURE packet, we can calculate the duration