Revision facc48f1 libavcodec/libvo-aacenc.c

View differences:

libavcodec/libvo-aacenc.c
59 59
    if (s->codec_api.SetParam(s->handle, VO_PID_AAC_ENCPARAM, &params)
60 60
        != VO_ERR_NONE) {
61 61
        av_log(avctx, AV_LOG_ERROR, "Unable to set encoding parameters\n");
62
        return AVERROR_UNKNOWN;
62
        return AVERROR(EINVAL);
63 63
    }
64 64

  
65 65
    for (index = 0; index < 16; index++)
......
68 68
    if (index == 16) {
69 69
        av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n",
70 70
                                    avctx->sample_rate);
71
        return AVERROR_NOTSUPP;
71
        return AVERROR(ENOSYS);
72 72
    }
73 73
    if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
74 74
        avctx->extradata_size = 2;
......
110 110
    if (s->codec_api.GetOutputData(s->handle, &output, &output_info)
111 111
        != VO_ERR_NONE) {
112 112
        av_log(avctx, AV_LOG_ERROR, "Unable to encode frame\n");
113
        return AVERROR_UNKNOWN;
113
        return AVERROR(EINVAL);
114 114
    }
115 115
    return output.Length;
116 116
}
117 117

  
118 118
AVCodec ff_libvo_aacenc_encoder = {
119 119
    "libvo_aacenc",
120
    CODEC_TYPE_AUDIO,
120
    AVMEDIA_TYPE_AUDIO,
121 121
    CODEC_ID_AAC,
122 122
    sizeof(AACContext),
123 123
    aac_encode_init,

Also available in: Unified diff