diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-18 00:00:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-07 16:38:29 +0200 |
commit | 7ab4358cda5d2e6517bd61b9bfce7ffde593def7 (patch) | |
tree | b71990b361b7b3404b212d166c6c6e615ede887d /libavformat/rmdec.c | |
parent | fdee09a19e4016092e447ea193d59328c0b7daf8 (diff) | |
download | ffmpeg-7ab4358cda5d2e6517bd61b9bfce7ffde593def7.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>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r-- | libavformat/rmdec.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index cae19c59c1..3032c8f43a 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -974,6 +974,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 format"), @@ -983,6 +995,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 = { |