Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index e6c3f9af6f..7d6df608c8 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2768,8 +2768,8 @@ static int mpegts_resync(AVFormatContext *s, int seekback, const uint8_t *curren
int64_t back = FFMIN(seekback, pos);
//Special case for files like 01c56b0dc1.ts
- if (current_packet[0] == 0x80 && current_packet[12] == 0x47) {
- avio_seek(pb, 12 - back, SEEK_CUR);
+ if (current_packet[0] == 0x80 && current_packet[12] == 0x47 && pos >= TS_PACKET_SIZE) {
+ avio_seek(pb, 12 - TS_PACKET_SIZE, SEEK_CUR);
return 0;
}