You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2022/05/18 14:24:35 UTC
[GitHub] [guacamole-server] necouchman commented on a diff in pull request #382: GUACAMOLE-1610 FFmpeg: Replace deprecated API (av_init_packet)
necouchman commented on code in PR #382:
URL: https://github.com/apache/guacamole-server/pull/382#discussion_r875965548
##########
src/guacenc/ffmpeg-compat.c:
##########
@@ -54,11 +54,8 @@ static int guacenc_write_packet(guacenc_video* video, void* data, int size) {
int ret;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,1,0)
-
- AVPacket pkt;
-
/* Have to create a packet around the encoded data we have */
- av_init_packet(&pkt);
+ AVPacket* pkt = av_packet_alloc();
Review Comment:
I don't think you want to do this. This goal of this entire file is to provide compatibility for older versions of ffmpeg that *don't* support the `av_packet_alloc()` (for example) functions. I believe the rest of the code has already been migrated to the newer code - see the `#else` below that matches this `#if`. I don't think these changes are necessary at all.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org