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:
Andreas Rheinhardt 2021-09-09 00:53:24 +02:00
parent dd0a7fdfc0
commit 9348d06fc6
1 changed files with 1 additions and 17 deletions

View File

@ -1590,23 +1590,7 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
av_freep(&bs);
av_freep(&sync);
if (pkt->data) {
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;
av_packet_move_ref(pkt, &new_pkt);
*got_packet = 1;
}