summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapidecoder_h264.c')
-rwxr-xr-x[-rw-r--r--]gst-libs/gst/vaapi/gstvaapidecoder_h264.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index 3f8bb844..78b093d1 100644..100755
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -1175,8 +1175,10 @@ decode_sps(GstVaapiDecoderH264 *decoder, GstH264NalUnit *nalu)
memset(sps, 0, sizeof(*sps));
result = gst_h264_parser_parse_sps(priv->parser, nalu, sps, TRUE);
- if (result != GST_H264_PARSER_OK)
+ if (result != GST_H264_PARSER_OK) {
+ priv->got_sps = FALSE;
return get_status(result);
+ }
priv->got_sps = TRUE;
return GST_VAAPI_DECODER_STATUS_SUCCESS;
@@ -1193,8 +1195,10 @@ decode_pps(GstVaapiDecoderH264 *decoder, GstH264NalUnit *nalu)
memset(pps, 0, sizeof(*pps));
result = gst_h264_parser_parse_pps(priv->parser, nalu, pps);
- if (result != GST_H264_PARSER_OK)
+ if (result != GST_H264_PARSER_OK) {
+ priv->got_pps = FALSE;
return get_status(result);
+ }
priv->got_pps = TRUE;
return GST_VAAPI_DECODER_STATUS_SUCCESS;