Fixes Ticket1605
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 519ebb5ee5b89b8ecc80b4a4540fcbeb65cda172)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -995,6 +995,18 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index, |
995 | 995 |
return dts; |
996 | 996 |
} |
997 | 997 |
|
998 |
+static int rm_read_seek(AVFormatContext *s, int stream_index, |
|
999 |
+ int64_t pts, int flags) |
|
1000 |
+{ |
|
1001 |
+ RMDemuxContext *rm = s->priv_data; |
|
1002 |
+ |
|
1003 |
+ if (ff_seek_frame_binary(s, stream_index, pts, flags) < 0) |
|
1004 |
+ return -1; |
|
1005 |
+ rm->audio_pkt_cnt = 0; |
|
1006 |
+ return 0; |
|
1007 |
+} |
|
1008 |
+ |
|
1009 |
+ |
|
998 | 1010 |
AVInputFormat ff_rm_demuxer = { |
999 | 1011 |
.name = "rm", |
1000 | 1012 |
.long_name = NULL_IF_CONFIG_SMALL("RealMedia"), |
... | ... |
@@ -1004,6 +1016,7 @@ AVInputFormat ff_rm_demuxer = { |
1004 | 1004 |
.read_packet = rm_read_packet, |
1005 | 1005 |
.read_close = rm_read_close, |
1006 | 1006 |
.read_timestamp = rm_read_dts, |
1007 |
+ .read_seek = rm_read_seek, |
|
1007 | 1008 |
}; |
1008 | 1009 |
|
1009 | 1010 |
AVInputFormat ff_rdt_demuxer = { |