|
@@ -219,8 +219,6 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt,
|
|
|
int sample_rate, int nb_samples)
|
|
|
{
|
|
|
AVFrame *frame = av_frame_alloc();
|
|
|
- int ret;
|
|
|
-
|
|
|
if (!frame) {
|
|
|
fprintf(stderr, "Error allocating an audio frame\n");
|
|
|
exit(1);
|
|
@@ -232,8 +230,7 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt,
|
|
|
frame->nb_samples = nb_samples;
|
|
|
|
|
|
if (nb_samples) {
|
|
|
- ret = av_frame_get_buffer(frame, 0);
|
|
|
- if (ret < 0) {
|
|
|
+ if (av_frame_get_buffer(frame, 0) < 0) {
|
|
|
fprintf(stderr, "Error allocating an audio buffer\n");
|
|
|
exit(1);
|
|
|
}
|