|
|
@@ -1761,19 +1761,20 @@ static av_cold int ac3_encode_init(AVCodecContext *avctx) |
|
|
s->mdct.avctx = avctx; |
|
|
s->mdct.avctx = avctx; |
|
|
ret = mdct_init(&s->mdct, 9); |
|
|
ret = mdct_init(&s->mdct, 9); |
|
|
if (ret) { |
|
|
if (ret) { |
|
|
ac3_encode_close(avctx); |
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
goto init_fail; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ret = allocate_buffers(avctx); |
|
|
ret = allocate_buffers(avctx); |
|
|
if (ret) { |
|
|
if (ret) { |
|
|
ac3_encode_close(avctx); |
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
goto init_fail; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
avctx->coded_frame= avcodec_alloc_frame(); |
|
|
avctx->coded_frame= avcodec_alloc_frame(); |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
|
|
|
init_fail: |
|
|
|
|
|
ac3_encode_close(avctx); |
|
|
|
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|