mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/encode: Remove dead code
Can be readded if needed (likely never). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
9a130a57cd
commit
a2e4ba4df6
1 changed files with 5 additions and 17 deletions
|
|
@ -841,24 +841,12 @@ int ff_encode_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
|
|||
{
|
||||
int ret;
|
||||
|
||||
switch (avctx->codec->type) {
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
frame->format = avctx->pix_fmt;
|
||||
if (frame->width <= 0 || frame->height <= 0) {
|
||||
frame->width = avctx->width;
|
||||
frame->height = avctx->height;
|
||||
}
|
||||
av_assert1(avctx->codec_type == AVMEDIA_TYPE_VIDEO);
|
||||
|
||||
break;
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
frame->sample_rate = avctx->sample_rate;
|
||||
frame->format = avctx->sample_fmt;
|
||||
if (!frame->ch_layout.nb_channels) {
|
||||
ret = av_channel_layout_copy(&frame->ch_layout, &avctx->ch_layout);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
frame->format = avctx->pix_fmt;
|
||||
if (frame->width <= 0 || frame->height <= 0) {
|
||||
frame->width = avctx->width;
|
||||
frame->height = avctx->height;
|
||||
}
|
||||
|
||||
ret = avcodec_default_get_buffer2(avctx, frame, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue