aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dfa.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-22 12:41:12 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-28 21:59:01 +0100
commit0b378e8aa99e24f5d1b128abaaf1572542ce86f1 (patch)
tree21fd1d0ff8629339fb94f21fc62c6d6bbdcfce7d /libavcodec/dfa.c
parentf870fc2fb9ef1a753d44b8b1d1c267c10581831f (diff)
downloadffmpeg-0b378e8aa99e24f5d1b128abaaf1572542ce86f1.tar.gz
DFA: fix "skip frame" TSW1 encoding.
Previously the decoder would raise an error. The end result is the same, the time stamps only change because regression tests create time stamps incorrectly. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/dfa.c')
-rw-r--r--libavcodec/dfa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index bce6260bf3..97c0954422 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -67,6 +67,8 @@ static int decode_tsw1(uint8_t *frame, int width, int height,
segments = bytestream_get_le32(&src);
offset = bytestream_get_le32(&src);
+ if (segments == 0 && offset == frame_end - frame)
+ return 0; // skip frame
if (frame_end - frame <= offset)
return -1;
frame += offset;