summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorMonty Montgomery <monty@xiph.org>2013-09-11 02:00:31 -0400
committerMichael Niedermayer <michaelni@gmx.at>2013-09-20 03:45:02 +0200
commitf6622f9610af513bc3277da09dcd2d9777f00343 (patch)
tree6b341d5725fb581943520cfe02ffdcf68621dc16 /libavformat/matroskadec.c
parent3e2a5b33f0355eeb80b6b2805be7f1b4fa1d1a46 (diff)
avformat/matroskadec: correct spurious keyframe warnings in webm
Minor change to fix for Trac #1003 to avoid squawking about files with valid keyframes that aren't marked (as opposed to frames that are marked as keyframes and aren't). Change correctly surpresses the spurious warnings, while still complaining about (and handling) the genuinely broken file attached to bug #1003. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8bbbf68ced..2482c6d390 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2558,12 +2558,12 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
if (matroska->skip_to_keyframe && track->type != MATROSKA_TRACK_TYPE_SUBTITLE) {
if (timecode < matroska->skip_to_timecode)
return res;
- if (!st->skip_to_keyframe) {
+ if (is_keyframe)
+ matroska->skip_to_keyframe = 0;
+ else if (!st->skip_to_keyframe) {
av_log(matroska->ctx, AV_LOG_ERROR, "File is broken, keyframes not correctly marked!\n");
matroska->skip_to_keyframe = 0;
}
- if (is_keyframe)
- matroska->skip_to_keyframe = 0;
}
res = matroska_parse_laces(matroska, &data, &size, (flags & 0x06) >> 1,