From c2f861ca42fa1a2fb6f7e85abb7bd44f39c6f2c4 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Tue, 27 Oct 2015 14:35:30 +0100 Subject: Replace remaining occurances of av_free_packet with av_packet_unref --- tests/api/api-band-test.c | 4 ++-- tests/api/api-flac-test.c | 2 +- tests/api/api-h264-test.c | 4 ++-- tests/api/api-seek-test.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/api/api-band-test.c b/tests/api/api-band-test.c index d0dee64ef8..8644e7df9e 100644 --- a/tests/api/api-band-test.c +++ b/tests/api/api-band-test.c @@ -190,12 +190,12 @@ static int video_decode(const char *input_filename) return -1; } } - av_free_packet(&pkt); + av_packet_unref(&pkt); av_init_packet(&pkt); } } while (!end_of_stream || got_frame); - av_free_packet(&pkt); + av_packet_unref(&pkt); av_frame_free(&fr); avcodec_close(ctx); avformat_close_input(&fmt_ctx); diff --git a/tests/api/api-flac-test.c b/tests/api/api-flac-test.c index 07030d6dda..7b480594b7 100644 --- a/tests/api/api-flac-test.c +++ b/tests/api/api-flac-test.c @@ -206,7 +206,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx, out_offset += out_frame_bytes; } } - av_free_packet(&enc_pkt); + av_packet_unref(&enc_pkt); } if (memcmp(raw_in, raw_out, out_frame_bytes * NUMBER_OF_FRAMES) != 0) { diff --git a/tests/api/api-h264-test.c b/tests/api/api-h264-test.c index e4bc0b816b..acf1636b39 100644 --- a/tests/api/api-h264-test.c +++ b/tests/api/api-h264-test.c @@ -134,13 +134,13 @@ static int video_decode_example(const char *input_filename) fr->pkt_pts, fr->pkt_dts, av_frame_get_pkt_duration(fr), number_of_written_bytes, av_adler32_update(0, (const uint8_t*)byte_buffer, number_of_written_bytes)); } - av_free_packet(&pkt); + av_packet_unref(&pkt); av_init_packet(&pkt); } i++; } while (!end_of_stream || got_frame); - av_free_packet(&pkt); + av_packet_unref(&pkt); av_frame_free(&fr); avcodec_close(ctx); avformat_close_input(&fmt_ctx); diff --git a/tests/api/api-seek-test.c b/tests/api/api-seek-test.c index 99fe90c242..135b972440 100644 --- a/tests/api/api-seek-test.c +++ b/tests/api/api-seek-test.c @@ -143,11 +143,11 @@ static int compute_crc_of_packets(AVFormatContext *fmt_ctx, int video_stream, } } } - av_free_packet(&pkt); + av_packet_unref(&pkt); av_init_packet(&pkt); } while ((!end_of_stream || got_frame) && (no_seeking || (fr->pkt_pts + av_frame_get_pkt_duration(fr) <= ts_end))); - av_free_packet(&pkt); + av_packet_unref(&pkt); av_freep(&byte_buffer); return 0; -- cgit v1.2.3