diff options
author | Johns <johns98@gmx.net> | 2012-01-08 21:46:00 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-01-08 21:46:00 +0100 |
commit | f6df79e8e64632314c72d85c2410141ab68bff1e (patch) | |
tree | 145e90a504d60f50e7e3b17c15b60096e235f2cb /codec.c | |
parent | f1551cd321bdadc69f95a450f2934ad71d3d4a8c (diff) | |
download | vdr-plugin-softhddevice-f6df79e8e64632314c72d85c2410141ab68bff1e.tar.gz vdr-plugin-softhddevice-f6df79e8e64632314c72d85c2410141ab68bff1e.tar.bz2 |
Improved replay of recordings.
Diffstat (limited to 'codec.c')
-rw-r--r-- | codec.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -561,6 +561,16 @@ void CodecVideoDecode(VideoDecoder * decoder, const AVPacket * avpkt) } } +/** +** Flush the video decoder. +** +** @param decoder video decoder data +*/ +void CodecVideoFlushBuffers(VideoDecoder * decoder) +{ + avcodec_flush_buffers(decoder->VideoCtx); +} + //---------------------------------------------------------------------------- // Audio //---------------------------------------------------------------------------- @@ -738,9 +748,11 @@ void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt) spkt->pts = avpkt->pts; spkt->dts = avpkt->dts; #endif +#ifdef DEBUG if (!audio_decoder->AudioParser) { Fatal(_("codec: internal error parser freeded while running\n")); } +#endif audio_ctx = audio_decoder->AudioCtx; index = 0; @@ -1026,6 +1038,17 @@ void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt) #endif +/** +** Flush the audio decoder. +** +** @param decoder audio decoder data +*/ +void CodecAudioFlushBuffers(AudioDecoder * decoder) +{ + // FIXME: reset audio parser + avcodec_flush_buffers(decoder->AudioCtx); +} + //---------------------------------------------------------------------------- // Codec //---------------------------------------------------------------------------- |