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

Michael Niedermayer michaelni
Sun Dec 19 04:33:41 CET 2010


On Sun, Dec 19, 2010 at 12:14:24AM +0300, Anatoly Nenashev wrote:
> 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  
> researches.
>
>
>

>  utils.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 7ef5b3502f5a80dfac8fe23c993b23ad930f2713  lowres.patch

lgtm


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101219/1705d87b/attachment.pgp>



More information about the ffmpeg-devel mailing list