diff --git a/src/gstducatih264dec.c b/src/gstducatih264dec.c
index 561b2f07be47871e57cfb8e22c6c5a6edec036ea..e5eeba07a49321db6115cf3afd0cfa3bf9634c4e 100644 (file)
--- a/src/gstducatih264dec.c
+++ b/src/gstducatih264dec.c
structure = gst_caps_get_structure (caps, 0);
if (structure) {
gint num_ref_frames = -1, num_reorder_frames = -1;
+ const char *profile;
+
+ /* baseline profile does not use B frames (and I'll say constrained-baseline
+ is unlikely either from the name, it's not present in my H264 spec... */
+ profile = gst_structure_get_string (structure, "profile");
+ if (profile && (!strcmp (profile, "baseline")
+ || !strcmp (profile, "constrained-baseline"))) {
+ GST_DEBUG_OBJECT (self, "No need for reordering for %s profile", profile);
+ self->backlog_maxframes = 0;
+ goto no_b_frames;
+ }
+
+
if (gst_structure_get_int (structure, "num-ref-frames", &num_ref_frames)
&& num_ref_frames >= 0) {
((IH264VDEC_Params *) self->params)->maxNumRefFrames = num_ref_frames;
self->backlog_maxframes);
}
+no_b_frames:
+
return TRUE;
}