diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c index 85119713eb..386fe5a1bb 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c @@ -3781,8 +3781,6 @@ gst_h264_parser_parse_decoder_config_record (GstH264NalParser * nalparser, if (ret->length_size_minus_one == 2) { /* "length_size_minus_one + 1" should be 1, 2, or 4 */ GST_WARNING ("Wrong nal-length-size"); - result = GST_H264_PARSER_ERROR; - goto error; } /* reserved 3bits */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c index eaf35852ee..9d126080f2 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c @@ -5093,8 +5093,6 @@ gst_h265_parser_parse_decoder_config_record (GstH265Parser * parser, if (ret->length_size_minus_one == 2) { /* "length_size_minus_one + 1" should be 1, 2, or 4 */ GST_WARNING ("Wrong nal-length-size"); - result = GST_H265_PARSER_ERROR; - goto error; } READ_CONFIG_UINT8 (num_of_arrays, 8); diff --git a/subprojects/gst-plugins-bad/tests/check/libs/h264parser.c b/subprojects/gst-plugins-bad/tests/check/libs/h264parser.c index f42fd31ac5..04fd1dc092 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/h264parser.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/h264parser.c @@ -845,12 +845,14 @@ GST_START_TEST (test_h264_decoder_config_record) assert_equals_int (ret, GST_H264_PARSER_ERROR); fail_unless (config == NULL); - /* wrong length size, return error with null config data */ + /* wrong length size, since we still try to use it. so return ok */ ret = gst_h264_parser_parse_decoder_config_record (parser, h264_wrong_length_size_codec_data, sizeof (h264_wrong_length_size_codec_data), &config); - assert_equals_int (ret, GST_H264_PARSER_ERROR); - fail_unless (config == NULL); + assert_equals_int (ret, GST_H264_PARSER_OK); + fail_unless (config != NULL); + assert_equals_int (config->length_size_minus_one, 2); + g_clear_pointer (&config, gst_h264_decoder_config_record_free); gst_h264_nal_parser_free (parser); }