[FFmpeg-devel] [PATCH] lavfi audio framework
Michael Niedermayer
michaelni
Tue Aug 17 04:17:27 CEST 2010
On Fri, Aug 13, 2010 at 07:40:15AM -0700, S.N. Hemanth Meenakshisundaram wrote:
[...]
> @@ -66,6 +67,70 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per
> return ref;
> }
>
> +AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms,
> + enum SampleFormat sample_fmt, int size,
> + int64_t channel_layout, int planar)
> +{
> + AVFilterBuffer *buffer = av_mallocz(sizeof(AVFilterBuffer));
> + AVFilterBufferRef *ref = av_mallocz(sizeof(AVFilterBufferRef));
> + int i, sample_size, num_chans, bufsize, per_channel_size, step_size = 0;
> + char *buf;
> +
> + ref->buf = buffer;
> + ref->format = sample_fmt;
> + ref->audio = av_mallocz(sizeof(AVFilterBufferRefAudioProps));
> + if (ref->audio) {
> + ref->audio->channel_layout = channel_layout;
> + ref->audio->size = size;
> + ref->audio->planar = planar;
> + }
the malloc failure is fatal
except that i see no problem after a quick look so if noone else except
stefano wants to review then its probably better to commit
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100817/a927745d/attachment.pgp>
More information about the ffmpeg-devel
mailing list