mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
omxvideodec: Always free all pending frames when caps changes require reconfiguration
This commit is contained in:
parent
0c0aa78373
commit
be1f75d2f4
1 changed files with 9 additions and 7 deletions
|
@ -1059,12 +1059,6 @@ gst_omx_video_dec_set_format (GstBaseVideoDecoder * decoder,
|
|||
self->started = FALSE;
|
||||
}
|
||||
|
||||
if (klass->hacks & GST_OMX_HACK_NO_COMPONENT_RECONFIGURE) {
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
gst_omx_video_dec_stop (GST_BASE_VIDEO_DECODER (self));
|
||||
gst_omx_video_dec_close (self);
|
||||
|
||||
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
||||
/* FIXME: Workaround for
|
||||
* https://bugzilla.gnome.org/show_bug.cgi?id=654529
|
||||
*/
|
||||
|
@ -1073,6 +1067,13 @@ gst_omx_video_dec_set_format (GstBaseVideoDecoder * decoder,
|
|||
g_list_free (GST_BASE_VIDEO_CODEC (self)->frames);
|
||||
GST_BASE_VIDEO_CODEC (self)->frames = NULL;
|
||||
|
||||
if (klass->hacks & GST_OMX_HACK_NO_COMPONENT_RECONFIGURE) {
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
gst_omx_video_dec_stop (GST_BASE_VIDEO_DECODER (self));
|
||||
gst_omx_video_dec_close (self);
|
||||
|
||||
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
||||
|
||||
if (!gst_omx_video_dec_open (self))
|
||||
return FALSE;
|
||||
needs_disable = FALSE;
|
||||
|
@ -1080,6 +1081,7 @@ gst_omx_video_dec_set_format (GstBaseVideoDecoder * decoder,
|
|||
if (gst_omx_port_manual_reconfigure (self->in_port,
|
||||
TRUE) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
|
||||
if (gst_omx_port_set_enabled (self->in_port, FALSE) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue