[FFmpeg-devel] [PATCH] Fix MPEG video lowres crash

Anatoly Nenashev anatoly.nenashev
Sat Dec 18 22:14:24 CET 2010

On 18.12.2010 15:43, Michael Niedermayer wrote:
> On Sat, Dec 18, 2010 at 02:56:31PM +0300, Anatoly Nenashev wrote:
>> I've found the following line in avcodec_align_dimensions2():
>> utils.c:188
>>      if(s->codec_id == CODEC_ID_H264)
>>          *height+=2; // some of the optimized chroma MC reads one line
>> too much
>> Does it mean that other decoders which uses h264_chroma_mc must be added
>> here?
> i thought that would simpler, yes
>> Corresponded patch in attachment. The list is too long therefore
>> probably I've forgotten some decoders.
>> I don't like this fix because if somebody will add new decoder which
>> uses MPV_decode_mb then it will be necessary not to forget to add
>> decoder in this condition. The other way is just remove the condition
>> and do "*height+=2" by default.
>> May be somebody has a better  idea.
> a || lowres seems simpler (if it works)

Ok. Patch in attachment. Tested under valgrind - no errors for ffplay 
with lowres=1,2,3 reported.
But there are still errors reported for ffmpeg as discribed in 
https://roundup.ffmpeg.org/issue2421. I think they need additional 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lowres.patch
Type: text/x-patch
Size: 615 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101219/ba9d6f43/attachment.bin>

More information about the ffmpeg-devel mailing list