Revision 89bc05d1 libavcodec/resample.c

View differences:

libavcodec/resample.c
257 257
            s->buffer_size[0] = input_size;
258 258
            s->buffer[0] = av_malloc(s->buffer_size[0]);
259 259
            if (!s->buffer[0]) {
260
                av_log(s, AV_LOG_ERROR, "Could not allocate buffer\n");
260
                av_log(s->resample_context, AV_LOG_ERROR, "Could not allocate buffer\n");
261 261
                return 0;
262 262
            }
263 263
        }
......
266 266

  
267 267
        if (av_audio_convert(s->convert_ctx[0], obuf, ostride,
268 268
                             ibuf, istride, nb_samples*s->input_channels) < 0) {
269
            av_log(s, AV_LOG_ERROR, "Audio sample format conversion failed\n");
269
            av_log(s->resample_context, AV_LOG_ERROR, "Audio sample format conversion failed\n");
270 270
            return 0;
271 271
        }
272 272

  
......
283 283
            s->buffer_size[1] = lenout;
284 284
            s->buffer[1] = av_malloc(s->buffer_size[1]);
285 285
            if (!s->buffer[1]) {
286
                av_log(s, AV_LOG_ERROR, "Could not allocate buffer\n");
286
                av_log(s->resample_context, AV_LOG_ERROR, "Could not allocate buffer\n");
287 287
                return 0;
288 288
            }
289 289
        }
......
348 348

  
349 349
        if (av_audio_convert(s->convert_ctx[1], obuf, ostride,
350 350
                             ibuf, istride, nb_samples1*s->output_channels) < 0) {
351
            av_log(s, AV_LOG_ERROR, "Audio sample format convertion failed\n");
351
            av_log(s->resample_context, AV_LOG_ERROR, "Audio sample format convertion failed\n");
352 352
            return 0;
353 353
        }
354 354
    }

Also available in: Unified diff