Opened 9 years ago

Closed 9 years ago

#4572 closed defect (duplicate)

mjpeg encoder crashes

Reported by: Marek Fort Owned by:
Priority: important Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Encoding mjpeg stream crashes. I do not have repro which I can share.
But I was able to find one commit which breaks the encoder.
My starting good version was 2.4 and breaking version 2.5. Then I used git bisect and found this commit:

Revision: 1441641d786a2deecae49c6dc2979af8791ce962
Author: Michael Niedermayer <>
Date: 29-Sep-14 5:42:59
avcodec/mpegvideo_enc: Allocate only a small buffer and reallocate as needed

This should reduce the memory requirement

Signed-off-by: Michael Niedermayer <>

Modified: libavcodec/mpegvideo_enc.c

I am not that good with ffmpeg internals to be able to find the real problem with this commit.

The app crashes with access violation. It writes to memory which is not allocated. The stack points to avcodec library.

Change History (1)

comment:1 by Carl Eugen Hoyos, 9 years ago

Analyzed by developer: unset
Keywords: mjpeg encoder removed
Resolution: duplicate
Status: newclosed
Version: 2.5.6git-master

Duplicate of ticket #4396

For future tickets: Please always test current FFmpeg git head.

Note: See TracTickets for help on using tickets.