Revision 3d0ef6dd libavcodec/faad.c

View differences:

libavcodec/faad.c
87 87
    // else r = s->faacDecInit(s->faac_handle ... );
88 88

  
89 89
    if (r < 0)
90
	fprintf(stderr, "faacDecInit2 failed r:%d   sr:%ld  ch:%d  s:%d\n",
90
	av_log(avctx, AV_LOG_ERROR, "faacDecInit2 failed r:%d   sr:%ld  ch:%d  s:%d\n",
91 91
		r, samplerate, channels, avctx->extradata_size);
92 92

  
93 93
    return r;
......
109 109
    //printf("DECODE FRAME %d, %d, %d - %p\n", buf_size, frame_info.samples, frame_info.bytesconsumed, out);
110 110

  
111 111
    if (frame_info.error > 0) {
112
	fprintf(stderr, "faac: frame decodinf failed: %s\n",
112
	av_log(avctx, AV_LOG_ERROR, "faac: frame decodinf failed: %s\n",
113 113
		s->faacDecGetErrorMessage(frame_info.error));
114 114
        return 0;
115 115
    }
......
146 146
    s->handle = dlopen(libfaadname, RTLD_LAZY);
147 147
    if (!s->handle)
148 148
    {
149
	fprintf(stderr, "FAAD library: %s could not be opened! \n%s\n",
149
	av_log(avctx, AV_LOG_ERROR, "FAAD library: %s could not be opened! \n%s\n",
150 150
		libfaadname, dlerror());
151 151
        return -1;
152 152
    }
......
182 182
    }
183 183
    if (err) {
184 184
        dlclose(s->handle);
185
	fprintf(stderr, "FAAD library: cannot resolve %s in %s!\n",
185
	av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n",
186 186
		err, libfaadname);
187 187
        return -1;
188 188
    }
......
190 190

  
191 191
    s->faac_handle = s->faacDecOpen();
192 192
    if (!s->faac_handle) {
193
        fprintf(stderr, "FAAD library: cannot create handler!\n");
193
        av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot create handler!\n");
194 194
        faac_decode_end(avctx);
195 195
        return -1;
196 196
    }
......
200 200

  
201 201
    if (faac_cfg) {
202 202
	switch (avctx->bits_per_sample) {
203
	case 8: fprintf(stderr, "FAADlib unsupported bps %d\n", avctx->bits_per_sample); break;
203
	case 8: av_log(avctx, AV_LOG_ERROR, "FAADlib unsupported bps %d\n", avctx->bits_per_sample); break;
204 204
	default:
205 205
	case 16:
206 206
	    faac_cfg->outputFormat = FAAD_FMT_16BIT;

Also available in: Unified diff