mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avcodec/libxvid: remove unnecessary output packet data check
The user buffers passed to avcodec_encode_video2() haven't been propagated to AVCodec.encode2 implementations since 93016f5d1d280f9cb7856883af287fa66affc04c. Also, the generic encode code already unrefs the packet if nothing was encoded. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
f404a2716a
commit
cad3a5d715
@ -738,7 +738,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||||
const AVFrame *picture, int *got_packet)
|
const AVFrame *picture, int *got_packet)
|
||||||
{
|
{
|
||||||
int xerr, i, ret, user_packet = !!pkt->data;
|
int xerr, i, ret;
|
||||||
struct xvid_context *x = avctx->priv_data;
|
struct xvid_context *x = avctx->priv_data;
|
||||||
int mb_width = (avctx->width + 15) / 16;
|
int mb_width = (avctx->width + 15) / 16;
|
||||||
int mb_height = (avctx->height + 15) / 16;
|
int mb_height = (avctx->height + 15) / 16;
|
||||||
@ -866,8 +866,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
if (!user_packet)
|
|
||||||
av_packet_unref(pkt);
|
|
||||||
if (!xerr)
|
if (!xerr)
|
||||||
return 0;
|
return 0;
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user