mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
ffmpegviddec: Properly error out when codec doesn't open
Avoids ending up using an un-set codec
This commit is contained in:
parent
9761a6501b
commit
1ca115c44b
1 changed files with 3 additions and 1 deletions
|
@ -413,7 +413,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
|
|||
{
|
||||
GstFFMpegVidDec *ffmpegdec;
|
||||
GstFFMpegVidDecClass *oclass;
|
||||
gboolean ret = TRUE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ffmpegdec = (GstFFMpegVidDec *) decoder;
|
||||
oclass = (GstFFMpegVidDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
|
||||
|
@ -528,6 +528,8 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
|
|||
gst_video_codec_state_unref (ffmpegdec->input_state);
|
||||
ffmpegdec->input_state = gst_video_codec_state_ref (state);
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
done:
|
||||
GST_OBJECT_UNLOCK (ffmpegdec);
|
||||
|
||||
|
|
Loading…
Reference in a new issue