Skip to content

Commit

Permalink
VideoEncoder: fix deprecation warnings
Browse files Browse the repository at this point in the history
av_packet_alloc is already calling the equivalent of av_init_packet
so we don't need to call it here.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Apr 19, 2021
1 parent d496d79 commit d6b7844
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions av/src/VideoEncoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ bool VideoEncoder::AddFrame(const unsigned char *_frame,
#else

AVPacket* avPacket = av_packet_alloc();
av_init_packet(avPacket);

avPacket->data = nullptr;
avPacket->size = 0;
Expand Down Expand Up @@ -890,7 +889,6 @@ bool VideoEncoder::Stop()
if (ret >= 0)
{
AVPacket *avPacket = av_packet_alloc();
av_init_packet(avPacket);
avPacket->data = nullptr;
avPacket->size = 0;

Expand Down

0 comments on commit d6b7844

Please sign in to comment.