Skip to content

Commit

Permalink
Unref the packet on error
Browse files Browse the repository at this point in the history
Do not leak the packet data on error.
  • Loading branch information
rom1v committed Mar 8, 2018
1 parent a34fbd2 commit f9562f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/src/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ static int run_decoder(void *data) {
push_frame(decoder);
} else if (ret != AVERROR(EAGAIN)) {
LOGE("Could not receive video frame: %d", ret);
av_packet_unref(&packet);
goto run_quit;
}
#else
Expand Down

0 comments on commit f9562f5

Please sign in to comment.