codecparsers: h264: fix error code for invalid size parsed in SPS.

gst_h264_parse_sps() returned FALSE if it parsed invalid (negative)
size components. Now make it gracefully return GST_H264_PARSER_ERROR
instead of GST_H264_PARSER_OK (FALSE).

https://bugzilla.gnome.org/show_bug.cgi?id=684568
This commit is contained in:
Gwenole Beauchesne 2012-09-21 18:23:21 +02:00 committed by Tim-Philipp Müller
parent b955c1233f
commit c951d201ec

View file

@ -1555,7 +1555,7 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
* subhc[sps->chroma_format_idc] * (2 - sps->frame_mbs_only_flag));
if (width < 0 || height < 0) {
GST_WARNING ("invalid width/height in SPS");
return FALSE;
goto error;
}
GST_LOG ("final width=%u, height=%u", width, height);
sps->width = width;