aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-18 00:00:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-20 23:08:46 +0100
commiteeb8dabd29d37f8f179281da74326e3868f1bb1b (patch)
tree44dfeba6bb3a9ed2ed7d4df06572cd64a66a1f0d
parent94576cec549ed34acca9d7098bdfc86e25946e13 (diff)
downloadffmpeg-eeb8dabd29d37f8f179281da74326e3868f1bb1b.tar.gz
rmdec: flush audio packet on seeking
Fixes Ticket1605 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 519ebb5ee5b89b8ecc80b4a4540fcbeb65cda172) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/rmdec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 3cbf3f590f..3af016fdcd 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -1014,6 +1014,18 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
return dts;
}
+static int rm_read_seek(AVFormatContext *s, int stream_index,
+ int64_t pts, int flags)
+{
+ RMDemuxContext *rm = s->priv_data;
+
+ if (ff_seek_frame_binary(s, stream_index, pts, flags) < 0)
+ return -1;
+ rm->audio_pkt_cnt = 0;
+ return 0;
+}
+
+
AVInputFormat ff_rm_demuxer = {
.name = "rm",
.long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
@@ -1023,6 +1035,7 @@ AVInputFormat ff_rm_demuxer = {
.read_packet = rm_read_packet,
.read_close = rm_read_close,
.read_timestamp = rm_read_dts,
+ .read_seek = rm_read_seek,
};
AVInputFormat ff_rdt_demuxer = {