legacyh264parse: fix output caps alignment for avc input

... particularly when splitting packetized input.

Fixes #652995.
This commit is contained in:
Mark Nauwelaerts 2011-06-21 12:45:31 +02:00
parent 10bec5c08f
commit d631e1b348

View file

@ -1313,16 +1313,18 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
alignment = "au";
} else {
if (h264parse->packetized) {
/* if packetized input, take upstream alignment if validly provided,
* otherwise assume au aligned ... */
alignment = gst_structure_get_string (structure, "alignment");
if (!alignment || (alignment &&
strcmp (alignment, "au") != 0 &&
strcmp (alignment, "nal") != 0)) {
if (h264parse->split_packetized)
alignment = "nal";
else
if (h264parse->split_packetized)
alignment = "nal";
else {
/* if packetized input is not split,
* take upstream alignment if validly provided,
* otherwise assume au aligned ... */
alignment = gst_structure_get_string (structure, "alignment");
if (!alignment || (alignment &&
strcmp (alignment, "au") != 0 &&
strcmp (alignment, "nal") != 0)) {
alignment = "au";
}
}
} else {
alignment = "nal";