[FFmpeg-cvslog] rmdec: flush audio packet on seeking
Michael Niedermayer
git at videolan.org
Thu May 9 22:52:27 CEST 2013
ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Mon Mar 18 00:00:02 2013 +0100| [54f39023931653fe3b925e1d2a0a3244f72b14ad] | committer: Michael Niedermayer
rmdec: flush audio packet on seeking
Fixes Ticket1605
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 519ebb5ee5b89b8ecc80b4a4540fcbeb65cda172)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=54f39023931653fe3b925e1d2a0a3244f72b14ad
---
libavformat/rmdec.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index ee1e0ff..243c693 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -1000,6 +1000,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"),
@@ -1009,6 +1021,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 = {
More information about the ffmpeg-cvslog
mailing list