[FFmpeg-devel] [PATCH 1/2] lavfi/showspectrum: fix crash in case of negative linesize

Paul B Mahol onemda at gmail.com
Tue Apr 30 23:55:02 CEST 2013


On 4/30/13, Joakim Plate <elupus at ecce.se> wrote:
> On Mon, Apr 29, 2013 at 8:40 PM, Paul B Mahol <onemda at gmail.com> wrote:
>>
>> On 4/29/13, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > On Mon, Apr 29, 2013 at 01:39:44PM +0000, Paul B Mahol wrote:
>> >
>> > width * "pixel size" is more correct than linesize
>> > (linesize could be for 2 lines in a field of a interlaced frame
>> >
>> > otherwise LGTM
>>
>> Is this new truth?
>> I don't see sanity behind such reasoning. This filter is not (i hope)
>> going
>> to do any such nonsense with fieds anytime soon and thus such complicated
>> code
>> is not required.
>>
>> I could even commit simplified version without loop.
>>
>
> The previous filter could have split a frame into two fields by just
> doubling linesize
> and starting address of data. That way no memcpy was required to split the
> frame
> into two fields.
>
> If you modify all data on the line you modify the the "other" field
> while this was not
> requested.

Well such behaviour is invalid, frames that do not have write permissions
should not be modified in any way, exp data and linesize stuff.

>
> /Joakim
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list