aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-21 21:48:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-21 22:35:07 +0200
commita0a4b1332281d37c1e940984d6b6bd5d42f965e6 (patch)
tree66b7381770343a08322f83a1fb68760b4a6f1284
parent08d4408a905be98a76cf49965e59e6bfecbb7213 (diff)
downloadffmpeg-a0a4b1332281d37c1e940984d6b6bd5d42f965e6.tar.gz
mpegts: remove read_seek()
Its redundant Found-by: nevcairiel Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mpegts.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index f014d7cace..5000134a25 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1876,32 +1876,6 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t target_ts, in
return ret;
}
-#else
-
-static int read_seek(AVFormatContext *s, int stream_index, int64_t target_ts, int flags){
- MpegTSContext *ts = s->priv_data;
- uint8_t buf[TS_PACKET_SIZE];
- int64_t pos;
-
- if(av_seek_frame_binary(s, stream_index, target_ts, flags) < 0)
- return -1;
- ff_read_frame_flush(s);
- return 0;
- pos= avio_tell(s->pb);
-
- for(;;) {
- avio_seek(s->pb, pos, SEEK_SET);
- if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
- return -1;
-// pid = AV_RB16(buf + 1) & 0x1fff;
- if(buf[1] & 0x40) break;
- pos += ts->raw_packet_size;
- }
- avio_seek(s->pb, pos, SEEK_SET);
-
- return 0;
-}
-
#endif
/**************************************************************/
@@ -1968,7 +1942,6 @@ AVInputFormat ff_mpegts_demuxer = {
.read_header = mpegts_read_header,
.read_packet = mpegts_read_packet,
.read_close = mpegts_read_close,
- .read_seek = read_seek,
.read_timestamp = mpegts_get_dts,
.flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT,
#ifdef USE_SYNCPOINT_SEARCH
@@ -1983,7 +1956,6 @@ AVInputFormat ff_mpegtsraw_demuxer = {
.read_header = mpegts_read_header,
.read_packet = mpegts_raw_read_packet,
.read_close = mpegts_read_close,
- .read_seek = read_seek,
.read_timestamp = mpegts_get_dts,
.flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT,
#ifdef USE_SYNCPOINT_SEARCH