diff options
author | James Almer <jamrial@gmail.com> | 2020-06-24 00:28:14 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-07-01 00:23:02 -0300 |
commit | 14f919515d1eedd7d00802cde2c739986fe8ed24 (patch) | |
tree | 505500e290236ecbcb350b7b4e4ebaff3aaf2adb /libavcodec/mlpenc.c | |
parent | 6b57d4d9eb27520893c39a6a51658272ccc5e0ca (diff) | |
download | ffmpeg-14f919515d1eedd7d00802cde2c739986fe8ed24.tar.gz |
avcodec/mlpenc: remove delay codec capability
The encoder has no delayed packets at the end of the encoding
process, so signaling this capability is unnecessary.
This also fixes an assertion failure introduced in 827d6fe73d, as
return values higher than 0 are not expected.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mlpenc.c')
-rw-r--r-- | libavcodec/mlpenc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index c6a7963c22..f99d2f5d6f 100644 --- a/libavcodec/mlpenc.c +++ b/libavcodec/mlpenc.c @@ -2226,9 +2226,6 @@ static int mlp_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, if ((ret = ff_alloc_packet2(avctx, avpkt, 87500 * avctx->channels, 0)) < 0) return ret; - if (!frame) - return 1; - /* add current frame to queue */ if ((ret = ff_af_queue_add(&ctx->afq, frame)) < 0) return ret; @@ -2389,7 +2386,7 @@ AVCodec ff_mlp_encoder = { .init = mlp_encode_init, .encode2 = mlp_encode_frame, .close = mlp_encode_close, - .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL, + .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_EXPERIMENTAL, .sample_fmts = (const enum AVSampleFormat[]) {AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE}, .supported_samplerates = (const int[]) {44100, 48000, 88200, 96000, 176400, 192000, 0}, .channel_layouts = ff_mlp_channel_layouts, @@ -2405,7 +2402,7 @@ AVCodec ff_truehd_encoder = { .init = mlp_encode_init, .encode2 = mlp_encode_frame, .close = mlp_encode_close, - .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL, + .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_EXPERIMENTAL, .sample_fmts = (const enum AVSampleFormat[]) {AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE}, .supported_samplerates = (const int[]) {44100, 48000, 88200, 96000, 176400, 192000, 0}, .channel_layouts = (const uint64_t[]) {AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, 0}, |