summaryrefslogtreecommitdiff
path: root/libavformat/wtv.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2011-01-09 02:42:16 +0000
committerPeter Ross <pross@xvid.org>2011-01-09 02:42:16 +0000
commit866009ea1982eaf81f1846e09c12ebfdec933fee (patch)
tree8125e003e60d8cfbdee9c87a3ab7cbef6282c97a /libavformat/wtv.c
parenta5a36a7970962007e1384ee036c2f50f9884421b (diff)
wtv: only process timestamp_guid chunks for streams that we know about
Originally committed as revision 26277 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/wtv.c')
-rw-r--r--libavformat/wtv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 5d784703ff..53650b57ef 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -456,6 +456,8 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
consumed += 15;
}
} else if (!ff_guidcmp(g, timestamp_guid)) {
+ int stream_index = ff_find_stream_index(s, sid);
+ if (stream_index >= 0) {
url_fskip(pb, 8);
wtv->pts = get_le64(pb);
consumed += 16;
@@ -466,6 +468,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
url_fskip(pb, WTV_PAD8(len) - consumed);
return 0;
}
+ }
} else if (!ff_guidcmp(g, data_guid)) {
int stream_index = ff_find_stream_index(s, sid);
if (mode == SEEK_TO_DATA && stream_index >= 0) {