<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi All,</div>

<div> </div>

<div>there is a known bug in the VideoCapture ffmpeg module of OpenCV. It occurs while loading videos without  a codec:</div>

<div>http://code.opencv.org/issues/1915</div>

<div>I had some time now to debug this bug and found the issue in:</div>

<div>CvCapture_FFMPEG::grabFrame()</div>

<div>In the function</div>

<div>avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet);</div>

<div>the AVFrame picture get set. But after</div>

<div>av_free_packet (&packet);</div>

<div>I get: "error: Cannot access memory at address..." for picture.data[0] which leads to a segmentation fault later in the function sws_scale().</div>

<div>I can encode this video with a video codec using ffmpeg or whatever and I get no segmentation fault (memory in picture.data[0] can still be accessed).</div>

<div>Of course there is an easy fix for this bug: Simply comment out / delete</div>

<div>av_free_packet (&packet);</div>

<div>This is working fine for me. Now I can process videos with and without codecs. But I am not sure if this will lead to memory issues if av_free_packet gets not called. Is there anybody who is familiar with the FFmpeg interface of OpenCV and can help me here?</div>

<div>Thanks a lot!</div>

<div> </div>

<div>Best regards,</div>

<div>Johannes Rehm</div>
</div></div></body></html>