You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/qsvenc: Remove dead code for user-provided buffers
Dead since commit 93016f5d1d
which ensured that the packets received by encoders are always blank.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1590,23 +1590,7 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
|
|||||||
av_freep(&bs);
|
av_freep(&bs);
|
||||||
av_freep(&sync);
|
av_freep(&sync);
|
||||||
|
|
||||||
if (pkt->data) {
|
av_packet_move_ref(pkt, &new_pkt);
|
||||||
if (pkt->size < new_pkt.size) {
|
|
||||||
av_log(avctx, AV_LOG_ERROR, "Submitted buffer not large enough: %d < %d\n",
|
|
||||||
pkt->size, new_pkt.size);
|
|
||||||
av_packet_unref(&new_pkt);
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(pkt->data, new_pkt.data, new_pkt.size);
|
|
||||||
pkt->size = new_pkt.size;
|
|
||||||
|
|
||||||
ret = av_packet_copy_props(pkt, &new_pkt);
|
|
||||||
av_packet_unref(&new_pkt);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
} else
|
|
||||||
*pkt = new_pkt;
|
|
||||||
|
|
||||||
*got_packet = 1;
|
*got_packet = 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user