[FFmpeg-devel] [RFC] libavfilter audio framework - split patches
Michael Niedermayer
michaelni
Sat Jul 17 20:23:56 CEST 2010
On Fri, Jul 16, 2010 at 01:08:25AM -0700, S.N. Hemanth Meenakshisundaram wrote:
>
>>>> On 07/15/2010 04:52 AM, S.N. Hemanth Meenakshisundaram wrote:
>>>>> On 07/14/2010 07:51 AM, Michael Niedermayer wrote:
>>>>>> [...]
>>>>>> to elaborate on this, we need patches that apply to svn.
>>>>>> you can send a patch series so that patch n depends on patches 0..n-1
>>>>>> to be applied before it.
>>>>>> but if patch x (x<n) is changed due to discussions all later patches
>>>>>> must be rebased on the new code. We dont apply bad patches and then
>>>>>> apply fixes on top.
>>>>>>
>>>>>>
>>>>
>>>> [...]
>>>>
>>>> Am sending the series of patches again with the changes pointed out
>>>> earlier. [...]
>
> This is audio framework formats.c changes.
>
> Regards,
> Hemanth
>
> formats.c | 34 +++++++++++++++++++++++++++++++++-
> 1 file changed, 33 insertions(+), 1 deletion(-)
> 172cfb52e782b46b18dd756ce52dd8b22dec77fe Patch1_lavfi_framework_formats.diff
> diff --git a/libavfilter/formats.c b/libavfilter/formats.c
> index bd1086f..0392a59 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -75,7 +75,11 @@ AVFilterFormats *avfilter_make_format_list(const int *fmts)
> AVFilterFormats *formats;
> int count;
>
> - for (count = 0; fmts[count] != PIX_FMT_NONE; count++)
> + /**
> + * FIXME: Both PIX_FMT_NONE and SAMPLE_FMT_NONE now have value -1 so this works.
> + * Need to handle the case where this may not be true.
> + */
add a
assert(PIX_FMT_NONE == SAMPLE_FMT_NONE && PIX_FMT_NONE == -1);
> + for (count = 0; fmts[count] != -1; count++)
> ;
>
> formats = av_mallocz(sizeof(AVFilterFormats));
> @@ -115,6 +119,34 @@ AVFilterFormats *avfilter_all_colorspaces(void)
> return ret;
> }
>
> +int avfilter_add_sampleformat(AVFilterFormats **avff, enum SampleFormat sample_fmt)
> +{
> + enum SampleFormat *sample_fmts;
> +
> + if (!(*avff) && !(*avff = av_mallocz(sizeof(AVFilterFormats))))
> + return AVERROR(ENOMEM);
> +
> + sample_fmts = av_realloc((*avff)->formats,
> + sizeof((*avff)->formats) * ((*avff)->format_count+1));
> + if (!sample_fmts)
> + return AVERROR(ENOMEM);
> +
> + (*avff)->formats = sample_fmts;
> + (*avff)->formats[(*avff)->format_count++] = sample_fmt;
> + return 0;
> +}
duplicate of avfilter_add_colorspace()
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100717/59e54a05/attachment.pgp>
More information about the ffmpeg-devel
mailing list