mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 01:02:19 +00:00
theoradec: Handle negotiation failure
Avoids a trove of random issues afterwards (due to decoder not *actually* being initialized/negotiated).
This commit is contained in:
parent
6280547be7
commit
c7917df7e2
1 changed files with 8 additions and 1 deletions
|
@ -516,7 +516,8 @@ theora_handle_type_packet (GstTheoraDec * dec)
|
|||
|
||||
dec->uncropped_info = state->info;
|
||||
|
||||
gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
|
||||
if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec)))
|
||||
goto not_negotiated;
|
||||
|
||||
dec->have_header = TRUE;
|
||||
|
||||
|
@ -528,6 +529,12 @@ unsupported_format:
|
|||
GST_ERROR_OBJECT (dec, "Invalid pixel format %d", dec->info.pixel_fmt);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
not_negotiated:
|
||||
{
|
||||
GST_ERROR_OBJECT (dec, "Failed to negotiate");
|
||||
return GST_FLOW_NOT_NEGOTIATED;
|
||||
}
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
Loading…
Reference in a new issue