diff options
-rw-r--r-- | src/libffmpeg/libavcodec/mpegvideo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/mpegvideo.c b/src/libffmpeg/libavcodec/mpegvideo.c index 3ecf6d29d..77d6691af 100644 --- a/src/libffmpeg/libavcodec/mpegvideo.c +++ b/src/libffmpeg/libavcodec/mpegvideo.c @@ -239,6 +239,9 @@ void ff_write_quant_matrix(PutBitContext *pb, int16_t *matrix){ const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){ int i; + if(p>=end) + return end; + for(i=0; i<3; i++){ uint32_t tmp= *state << 8; *state= tmp + *(p++); |