{
GstVaapiDecoderH264Private *const priv = &decoder->priv;
GstVaapiPictureH264 *found_picture = NULL;
- guint i, j, found_index;
+ guint i, j, found_index = -1;
g_return_val_if_fail (picture != NULL, -1);
if (found_picture_ptr)
*found_picture_ptr = found_picture;
- return found_picture ? found_index : -1;
+ return found_index;
}
/* Finds the picture with the lowest POC that needs to be output */
{
GstVaapiDecoderH264Private *const priv = &decoder->priv;
GstVaapiPictureH264 *found_picture = NULL;
- guint i, j, found_index;
+ guint i, j, found_index = -1;
for (i = 0; i < priv->dpb_count; i++) {
GstVaapiFrameStore *const fs = priv->dpb[i];
if (found_picture_ptr)
*found_picture_ptr = found_picture;
- return found_picture ? found_index : -1;
+ return found_index;
}
/* Finds the picture with the lowest VOC that needs to be output */
{
GstVaapiDecoderH264Private *const priv = &decoder->priv;
GstVaapiPictureH264 *found_picture = NULL;
- guint i, j, found_index;
+ guint i, j, found_index = -1;
for (i = 0; i < priv->dpb_count; i++) {
GstVaapiFrameStore *const fs = priv->dpb[i];
if (found_picture_ptr)
*found_picture_ptr = found_picture;
- return found_picture ? found_index : -1;
+ return found_index;
}
static gboolean
{
GstVaapiDecoderH265Private *const priv = &decoder->priv;
GstVaapiPictureH265 *found_picture = NULL;
- guint i, found_index;
+ guint i, found_index = -1;
for (i = 0; i < priv->dpb_count; i++) {
GstVaapiPictureH265 *const picture = priv->dpb[i]->buffer;
if (found_picture_ptr)
*found_picture_ptr = found_picture;
- return found_picture ? found_index : -1;
+ return found_index;
}
static gboolean