[MPlayer-cvslog] r32992 - in trunk: fmt-conversion.c fmt-conversion.h

Alexander Strasser eclipse7 at gmx.net
Wed Mar 2 00:37:06 CET 2011


reimar wrote:
> Author: reimar
> Date: Tue Mar  1 22:44:15 2011
> New Revision: 32992
> 
> Log:
> Add conversion functions to and from AVSampleFormat.
> 
> Modified:
>    trunk/fmt-conversion.c
>    trunk/fmt-conversion.h
> 
> Modified: trunk/fmt-conversion.c
> ==============================================================================
[...]
> +enum AVSampleFormat affmt2samplefmt(int fmt)
> +{
> +    char str[50];
> +    int i;
> +    enum AVSampleFormat sample_fmt;
> +    for (i = 0; samplefmt_conversion_map[i].fmt; i++)
> +        if (samplefmt_conversion_map[i].fmt == fmt)
> +            break;
> +    sample_fmt = samplefmt_conversion_map[i].sample_fmt;
> +    if (sample_fmt == PIX_FMT_NONE)

  AV_SAMPLE_FMT_NONE, isn't it?

[...]
> Modified: trunk/fmt-conversion.h
> ==============================================================================
> --- trunk/fmt-conversion.h	Tue Mar  1 12:02:48 2011	(r32991)
> +++ trunk/fmt-conversion.h	Tue Mar  1 22:44:15 2011	(r32992)
> @@ -21,8 +21,11 @@
>  
>  #include "config.h"
>  #include "libavutil/avutil.h"
> +#include "libavutil/samplefmt.h"
>  
>  enum PixelFormat imgfmt2pixfmt(int fmt);
>  int pixfmt2imgfmt(enum PixelFormat pix_fmt);
> +enum AVSampleFormat affmt2samplefmt(int fmt);
> +int samplefmt2affmt(enum AVSampleFormat sample_fmt);

  Maybe naming it avsamplefmt in the function names would have been a bit
more descriptive?

  It's just a thought though, I really don't know if and how it is called
elsewhere in the code base.

[...]

  Alexander


More information about the MPlayer-cvslog mailing list