aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-11 08:14:50 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-11 08:14:50 +0000
commit89bc05d1ea8e341b990d27c4cafa2f60a61b296d (patch)
tree5b17d0e9c0ab8143331b8c6d568072745f95ec1b /libavcodec
parent77fc598d984ed23e66a5aa5b97c2982a79552abf (diff)
downloadffmpeg-89bc05d1ea8e341b990d27c4cafa2f60a61b296d.tar.gz
give s->resample_context to avoid segfault, avclass was moved
Originally committed as revision 19150 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/resample.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index 122b725d39..fea8e75b35 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -257,7 +257,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
s->buffer_size[0] = input_size;
s->buffer[0] = av_malloc(s->buffer_size[0]);
if (!s->buffer[0]) {
- av_log(s, AV_LOG_ERROR, "Could not allocate buffer\n");
+ av_log(s->resample_context, AV_LOG_ERROR, "Could not allocate buffer\n");
return 0;
}
}
@@ -266,7 +266,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
if (av_audio_convert(s->convert_ctx[0], obuf, ostride,
ibuf, istride, nb_samples*s->input_channels) < 0) {
- av_log(s, AV_LOG_ERROR, "Audio sample format conversion failed\n");
+ av_log(s->resample_context, AV_LOG_ERROR, "Audio sample format conversion failed\n");
return 0;
}
@@ -283,7 +283,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
s->buffer_size[1] = lenout;
s->buffer[1] = av_malloc(s->buffer_size[1]);
if (!s->buffer[1]) {
- av_log(s, AV_LOG_ERROR, "Could not allocate buffer\n");
+ av_log(s->resample_context, AV_LOG_ERROR, "Could not allocate buffer\n");
return 0;
}
}
@@ -348,7 +348,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
if (av_audio_convert(s->convert_ctx[1], obuf, ostride,
ibuf, istride, nb_samples1*s->output_channels) < 0) {
- av_log(s, AV_LOG_ERROR, "Audio sample format convertion failed\n");
+ av_log(s->resample_context, AV_LOG_ERROR, "Audio sample format convertion failed\n");
return 0;
}
}