Fixed version mismatch in ffmpeg h264

This commit is contained in:
Armin Novak 2022-03-30 18:34:21 +02:00 committed by akallabeth
parent 944e14ab82
commit 66c7228643

View File

@ -333,16 +333,12 @@ static int libavcodec_compress(H264_CONTEXT* h264, const BYTE** pSrcYuv, const U
if (!libavcodec_create_encoder(h264))
return -1;
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 39, 100)
sys->packet = &sys->bufferpacket;
WINPR_ASSERT(sys->packet);
av_packet_unref(sys->packet);
#else
av_packet_free(&sys->packet);
#endif
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 133, 100)
sys->packet = &sys->bufferpacket;
av_packet_unref(sys->packet);
av_init_packet(sys->packet);
#else
av_packet_free(&sys->packet);
sys->packet = av_packet_alloc();
#endif
if (!sys->packet)