diff --git a/libavformat/avidec.c b/libavformat/avidec.c index b4ccfb50f8..13a39c0e11 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1116,7 +1116,7 @@ resync: } ast->frame_offset += get_duration(ast, pkt->size); } - ast->remaining -= size; + ast->remaining -= err; if(!ast->remaining){ avi->stream_index= -1; ast->packet_size= 0;