h264parse: fix test and set not using the same input

This fixes H.264 output not having a set framerate, and
confusing some of the elements downstream (such as interlace).
This commit is contained in:
Vincent Penquerc'h 2012-01-06 10:52:36 +00:00
parent 1c25aab906
commit 4f27b2b4fe

View file

@ -1060,7 +1060,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
gst_caps_set_simple (caps, "width", G_TYPE_INT, sps->width,
"height", G_TYPE_INT, sps->height, NULL);
/* but not necessarily or reliably this */
if (h264parse->fps_num > 0 && h264parse->fps_den > 0)
if (sps->fps_num > 0 && sps->fps_den > 0)
gst_caps_set_simple (caps, "framerate",
GST_TYPE_FRACTION, sps->fps_num, sps->fps_den, NULL);
}