[FFmpeg-devel] [PATCH] swscale-test: use libavcore to get linesize

Ramiro Polla ramiro.polla
Tue Aug 3 01:18:25 CEST 2010


Hi,

On Sat, Jul 31, 2010 at 8:21 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, Jul 31, 2010 at 07:27:58PM -0300, Ramiro Polla wrote:
>> $subj
>
>> ?Makefile ? ? ? | ? ?1 +
>> ?swscale-test.c | ? 19 +++----------------
>> ?2 files changed, 4 insertions(+), 16 deletions(-)
>> d1c7322c3efe7f24e55c2e920de59a0ef1639d4d ?swscale-test_stride.diff
>
> should be ok

This patch would allocate zero-sized blocks for strides that were
zero. This lead to a problem in planarCopyWrapper() which tests
dst[plane] to see if data should be copied for that plane.

I have attached two new patches. The first patch makes
planarCopyWrapper() check for both dst[plane] and dstStride[plane],
and the second patch does the same the previous patch did but only
allocates when stride != 0.

With patch2, patch1 shouldn't be necessary, but it makes swscale more
robust for bogus input (allocated planes but no stride).

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscale-test_1.diff
Type: application/octet-stream
Size: 502 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100802/86dd285d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscale-test_2.diff
Type: application/octet-stream
Size: 2864 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100802/86dd285d/attachment-0001.obj>



More information about the ffmpeg-devel mailing list