On Fri, Oct 21, 2011 at 05:58:44PM -0400, Justin Ruggles wrote:
> TTA only supports 16-bit and 24-bit, and our decoder only supports 16-bit.
> ---
>  libavcodec/tta.c |   17 +++++++++--------
>  1 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/libavcodec/tta.c b/libavcodec/tta.c
> index fa599b8..31f861c 100644
> --- a/libavcodec/tta.c
> +++ b/libavcodec/tta.c
> @@ -225,14 +225,15 @@ static av_cold int tta_decode_init(AVCodecContext * 
> avctx)
>          skip_bits(&s->gb, 32); // CRC32 of header
>  
>          switch(s->bps) {
> -//            case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break;
> -            case 2: avctx->sample_fmt = AV_SAMPLE_FMT_S16; break;
> -//            case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break;
> -            case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;
> -            default:
> -                av_log_ask_for_sample(s->avctx,
> -                                      "Invalid/unsupported sample 
> format.\n");
> -                return -1;
> +        case 2:
> +            avctx->sample_fmt = AV_SAMPLE_FMT_S16;
> +            break;
> +        case 3:
> +            av_log_missing_feature(avctx, "Unsupported sample format.\n", 0);
> +            return AVERROR(EINVAL);
> +        default:
> +            av_log(avctx, AV_LOG_ERROR, "Invalid sample format\n");
> +            return AVERROR(EINVAL);
>          }
>  
>          // FIXME: horribly broken, but directly from reference source
> -- 

OK
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to