1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mpeg4: use a self-explanatory #define MAX_NVOP_SIZE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Andreas Cadhalpun 2015-04-03 19:14:16 +02:00 committed by Michael Niedermayer
parent 241913c0d0
commit f62880bfb8
2 changed files with 4 additions and 1 deletions

View File

@ -459,7 +459,7 @@ retry:
} }
} }
if (s->bitstream_buffer_size && (s->divx_packed || buf_size < 20)) // divx 5.01+/xvid frame reorder if (s->bitstream_buffer_size && (s->divx_packed || buf_size <= MAX_NVOP_SIZE)) // divx 5.01+/xvid frame reorder
ret = init_get_bits8(&s->gb, s->bitstream_buffer, ret = init_get_bits8(&s->gb, s->bitstream_buffer,
s->bitstream_buffer_size); s->bitstream_buffer_size);
else else

View File

@ -59,6 +59,9 @@
#define VISUAL_OBJ_STARTCODE 0x1B5 #define VISUAL_OBJ_STARTCODE 0x1B5
#define VOP_STARTCODE 0x1B6 #define VOP_STARTCODE 0x1B6
/* smaller packets likely don't contain a real frame */
#define MAX_NVOP_SIZE 19
typedef struct Mpeg4DecContext { typedef struct Mpeg4DecContext {
MpegEncContext m; MpegEncContext m;