aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/movsub_bsf.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-06-23 06:46:12 +0200
committerJames Almer <jamrial@gmail.com>2019-06-24 23:49:19 -0300
commit800f618a340d122754e7bdb82c22463cb9bd17b0 (patch)
tree79b12e77bc199bc4f322124d7c740b8113b70b28 /libavcodec/movsub_bsf.c
parent053d33b46b169f35e644ddbf2a2e482515d3a8fe (diff)
downloadffmpeg-800f618a340d122754e7bdb82c22463cb9bd17b0.tar.gz
movsub_bsf: Fix mov2textsub regression
The mov flavour of timed text uses the first two bytes of the packet as a length field. And up until 11bef2fe said length field has been read correctly in the mov2textsub bsf. But since then the next two bytes are read as if they were the length field. This is fixed in this commit. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/movsub_bsf.c')
-rw-r--r--libavcodec/movsub_bsf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/movsub_bsf.c b/libavcodec/movsub_bsf.c
index 5878607061..cd48aa7bb8 100644
--- a/libavcodec/movsub_bsf.c
+++ b/libavcodec/movsub_bsf.c
@@ -75,8 +75,8 @@ static int mov2textsub(AVBSFContext *ctx, AVPacket *pkt)
return AVERROR_INVALIDDATA;
}
- pkt->data += 2;
pkt->size = FFMIN(pkt->size - 2, AV_RB16(pkt->data));
+ pkt->data += 2;
return 0;
}