summaryrefslogtreecommitdiff
path: root/codec.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-08 21:46:00 +0100
committerJohns <johns98@gmx.net>2012-01-08 21:46:00 +0100
commitf6df79e8e64632314c72d85c2410141ab68bff1e (patch)
tree145e90a504d60f50e7e3b17c15b60096e235f2cb /codec.c
parentf1551cd321bdadc69f95a450f2934ad71d3d4a8c (diff)
downloadvdr-plugin-softhddevice-f6df79e8e64632314c72d85c2410141ab68bff1e.tar.gz
vdr-plugin-softhddevice-f6df79e8e64632314c72d85c2410141ab68bff1e.tar.bz2
Improved replay of recordings.
Diffstat (limited to 'codec.c')
-rw-r--r--codec.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/codec.c b/codec.c
index 790f2e0..158b1eb 100644
--- a/codec.c
+++ b/codec.c
@@ -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
//----------------------------------------------------------------------------