mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
libs: decoder: h264: remove unrequired NULL check
Coverity scan bug: Dereference after null check: Either the check against null is unnecessary, or there may be a null pointer dereference. In the original commit for fill_picture_gaps() (commit5abd2b90
) the prev_picture could be NULL, that's why the code did a null check. But, since commit52adebe7
, the previous reference frames are tracked, thus there is no need to check null anymore.
This commit is contained in:
parent
3bb96eff14
commit
9eddf6c004
1 changed files with 2 additions and 5 deletions
|
@ -3252,7 +3252,7 @@ fill_picture_gaps (GstVaapiDecoderH264 * decoder, GstVaapiPictureH264 * picture,
|
|||
return TRUE;
|
||||
|
||||
prev_frame = priv->prev_ref_frames[picture->base.voc];
|
||||
g_assert (prev_frame != NULL);
|
||||
g_assert (prev_frame != NULL && prev_frame->buffers[0] != NULL);
|
||||
prev_picture = gst_vaapi_picture_ref (prev_frame->buffers[0]);
|
||||
gst_vaapi_picture_ref (picture);
|
||||
|
||||
|
@ -3286,10 +3286,7 @@ fill_picture_gaps (GstVaapiDecoderH264 * decoder, GstVaapiPictureH264 * picture,
|
|||
break;
|
||||
|
||||
/* Create new picture */
|
||||
if (prev_picture)
|
||||
lost_picture = gst_vaapi_picture_h264_new_clone (prev_picture);
|
||||
else
|
||||
lost_picture = gst_vaapi_picture_h264_new (decoder);
|
||||
lost_picture = gst_vaapi_picture_h264_new_clone (prev_picture);
|
||||
if (!lost_picture)
|
||||
goto error_allocate_picture;
|
||||
|
||||
|
|
Loading…
Reference in a new issue