[FFmpeg-devel] [PATCH] Fix linesize and data pointers for packed data in AVFilterBufferRef
S.N. Hemanth Meenakshisundaram
smeenaks
Wed Aug 25 09:42:08 CEST 2010
This is a correction to the way the buffer pointers and linesizes are
set for each channel in AVFilterBufferRef for audio data.
In both planar and packed, data[i] should contain a pointer to the
beginning of ith channel data and linesize[i] should contain the number
of bytes to next sample of the ith channel.
Earlier there was a bug in the way this was set for packed and was wrong
for planar.
Now for planar,
Each data[i] points to the start of data for that channel and
linesize[i] is equal to sample size for all channels (e.g. 2 bytes for S16).
For packed,
linesize[i] is equal to sample size * number of channels and data[i]
points to first sample of that channel.
This behaviour is needed for using av_audio_convert from within
af_resample (patch follows).
Patch passes 'make test' and is based on latest SVN.
---
libavfilter/defaults.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-linesize-and-data-pointers-for-packed-data-in-AV.patch
Type: text/x-patch
Size: 1396 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100825/577df63e/attachment.bin>
More information about the ffmpeg-devel
mailing list