History

avcodec/mpegvideo_enc: Ignore ICC profile size when not MJPEG

MJPEG is the only mpegvideo-based encoder making use of it. Fixes linking failures in case mpegvideo_enc.c is compiled with AMV, LJPEG and MJPEG encoders disabled.

Andreas Rheinhardt committed 4 years ago

Commit 4487dd81 parent 1764a681 file · +5 −2Browse files

Unified · Split

libavcodec/mpegvideo_enc.c+5−2
@@ -1687,8 +1687,11 @@ int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, · 1686 unmodified lines
1687 size_t pkt_size = growing_buffer ? FFMAX(s->mb_width*s->mb_height*64+10000, avctx->internal->byte_buffer_size) - AV_INPUT_BUFFER_PADDING_SIZE1687 size_t pkt_size = growing_buffer ? FFMAX(s->mb_width*s->mb_height*64+10000, avctx->internal->byte_buffer_size) - AV_INPUT_BUFFER_PADDING_SIZE
1688 :1688 :
1689 s->mb_width*s->mb_height*(MAX_MB_BYTES+100)+10000;1689 s->mb_width*s->mb_height*(MAX_MB_BYTES+100)+10000;
1690 if ((ret = ff_mjpeg_add_icc_profile_size(avctx, s->new_picture, &pkt_size)) < 0)1690 if (CONFIG_MJPEG_ENCODER && avctx->codec_id == AV_CODEC_ID_MJPEG) {
1691 return ret;1691 ret = ff_mjpeg_add_icc_profile_size(avctx, s->new_picture, &pkt_size);
1692 if (ret < 0)
1693 return ret;
1694 }
1692 if ((ret = ff_alloc_packet(avctx, pkt, pkt_size)) < 0)1695 if ((ret = ff_alloc_packet(avctx, pkt, pkt_size)) < 0)
1693 return ret;1696 return ret;
1694 if (s->mb_info) {1697 if (s->mb_info) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t