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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]