codecs: h264: Do not ignore end_picture() return value

If decoding failed because end_picture() failed, set the picture to
nonexisting, this way output_picture() will be skipped. This avoids confusing
special cases in output_picture() implementation.
This commit is contained in:
Nicolas Dufresne 2020-03-18 16:51:11 -04:00
parent 390cbe1f00
commit bd7db13412

View file

@ -1133,8 +1133,10 @@ gst_h264_decoder_finish_current_picture (GstH264Decoder * self)
klass = GST_H264_DECODER_GET_CLASS (self);
if (klass->end_picture)
ret = klass->end_picture (self, priv->current_picture);
if (klass->end_picture) {
if (!klass->end_picture (self, priv->current_picture))
priv->current_picture->nonexisting = TRUE;
}
/* finish picture takes ownership of the picture */
ret = gst_h264_decoder_finish_picture (self, priv->current_picture);