Commit 04ee03f2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: add explicit subtitle close function

parent c2c55f32
......@@ -343,9 +343,11 @@ static void CloseDecoder( vlc_object_t *p_this )
case AUDIO_ES:
EndAudioDec( p_dec );
break;
default:
ffmpeg_CloseCodec( p_dec );
case SPU_ES:
EndSubtitleDec( p_dec );
break;
default:
vlc_assert_unreachable();
}
decoder_sys_t *p_sys = p_dec->p_sys;
......
......@@ -44,6 +44,7 @@ void EndAudioDec( decoder_t *p_dec );
/* Subtitle Decoder */
int InitSubtitleDec( decoder_t *, AVCodecContext *, const AVCodec * );
void EndSubtitleDec( decoder_t * );
/* Initialize decoder */
int ffmpeg_OpenCodec( decoder_t *p_dec );
......
......@@ -119,6 +119,11 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
return VLC_SUCCESS;
}
void EndSubtitleDec(decoder_t *dec)
{
ffmpeg_CloseCodec(dec);
}
/**
* Flush
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment