[FFmpeg-devel] mjpeg decoder segfault

Jesse L. Zamora xtremek2008
Tue Sep 16 12:47:56 CEST 2008


On Monday 15 September 2008 07:27:01 pm Jesse L. Zamora wrote:
> Hello All,
>
>     In my smv decoder, I am trying to use the mjpeg decoder to decode the
> jpeg images. But, in my smv_decode_frame() function, mjpeg has a segfault.
> After doing some debugging, I found that the problem was with the
> avctx->release_buffer() function call (in the mjpegdec.c source file, in
> the ff_mjpeg_decode_sof() function, on line 335). I've been trying very
> hard to figure out what is wrong, but I can't figure it out! I was
> wondering if anyone had any suggestions or ideas on how to get it to work
> correctly! :-(
>
> Here is my smv_decode_frame() function:
>
> static int smv_decode_frame(AVCodecContext *avctx,
>                               void *data, int *data_size,
>                               const uint8_t *buf, int buf_size)
> {
>     int ret;
>
>     ret = ff_mjpeg_decode_frame(avctx, data, data_size, buf, buf_size);
>
>     if(ret != 0)
>     {
>         av_log(avctx, AV_LOG_ERROR, "Error decoding jpeg frame!\n");
>         return -1;
>     }
>
>     return 0;
> }
>
> Thanks,
> Xtreme Kommander
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

Actually guys I just figured it out......instead of having my own decoder, I 
can just use MJPEG directly from the demuxer.....I've got it to output frames 
+ audio to an avi file already...... :-)

Thanks,

Xtreme Kommander




More information about the ffmpeg-devel mailing list