mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
Release the codec before freeing it
On Samsung Galaxy S4 it is impossible to have more than one hardware decoder at the same time. If we do not release it explicitly the GC only releases it whenever the whole application is finished not whenever the activity is finished and thus a player will not be able to work correctly
This commit is contained in:
parent
0ae4bc74ba
commit
ad82575693
2 changed files with 6 additions and 2 deletions
|
@ -246,8 +246,10 @@ gst_amc_audio_dec_close (GstAudioDecoder * decoder)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Closing decoder");
|
||||
|
||||
if (self->codec)
|
||||
if (self->codec) {
|
||||
gst_amc_codec_release (self->codec);
|
||||
gst_amc_codec_free (self->codec);
|
||||
}
|
||||
self->codec = NULL;
|
||||
|
||||
self->started = FALSE;
|
||||
|
|
|
@ -270,8 +270,10 @@ gst_amc_video_dec_close (GstVideoDecoder * decoder)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Closing decoder");
|
||||
|
||||
if (self->codec)
|
||||
if (self->codec) {
|
||||
gst_amc_codec_release (self->codec);
|
||||
gst_amc_codec_free (self->codec);
|
||||
}
|
||||
self->codec = NULL;
|
||||
|
||||
self->started = FALSE;
|
||||
|
|
Loading…
Reference in a new issue