summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2021-01-09 16:05:48 +0800
committerHe Junyan <junyan.he@intel.com>2021-01-09 21:01:16 +0800
commit5e3fde85692221d42d93ec98fffa0d6f1aa308f7 (patch)
treededb9ae79aa4f13ff1087efb979ca9ce07e4bab9 /gst-libs
parent5523b75550111a6eae828c3053a5015bef233090 (diff)
decoder: AV1: Fix a static analysis problem of update_state().
No need to check the picture pointer after we have already dereferenced it. Fix: #298 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/408>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_av1.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_av1.c b/gst-libs/gst/vaapi/gstvaapidecoder_av1.c
index 062b310b..a4faf5d2 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_av1.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_av1.c
@@ -978,13 +978,8 @@ av1_decoder_update_state (GstVaapiDecoderAV1 * decoder,
for (i = 0; i < GST_AV1_NUM_REF_FRAMES; i++) {
if ((picture->frame_header.refresh_frame_flags >> i) & 1) {
- if (picture) {
- GST_LOG ("reference frame %p to ref slot:%d", picture, i);
- gst_vaapi_picture_replace (&priv->ref_frames[i], picture);
- } else {
- GST_ERROR ("we miss some reference frame for ref slot:%d", i);
- gst_vaapi_picture_replace (&priv->ref_frames[i], NULL);
- }
+ GST_LOG ("reference frame %p to ref slot:%d", picture, i);
+ gst_vaapi_picture_replace (&priv->ref_frames[i], picture);
}
}