Commit 800f618a authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by James Almer

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: 's avatarPhilip Langdale <philipl@overt.org>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 053d33b4
...@@ -75,8 +75,8 @@ static int mov2textsub(AVBSFContext *ctx, AVPacket *pkt) ...@@ -75,8 +75,8 @@ static int mov2textsub(AVBSFContext *ctx, AVPacket *pkt)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
pkt->data += 2;
pkt->size = FFMIN(pkt->size - 2, AV_RB16(pkt->data)); pkt->size = FFMIN(pkt->size - 2, AV_RB16(pkt->data));
pkt->data += 2;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment