diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-10-27 14:35:30 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-10-27 14:35:30 +0100 |
commit | c2f861ca42fa1a2fb6f7e85abb7bd44f39c6f2c4 (patch) | |
tree | fd5a76e51fa3eb2b90deafbb6c0c48a127be42a9 /ffmpeg.c | |
parent | 7f5af80ba42bbd82da53dfd95236e9d47159a96a (diff) | |
download | ffmpeg-c2f861ca42fa1a2fb6f7e85abb7bd44f39c6f2c4.tar.gz |
Replace remaining occurances of av_free_packet with av_packet_unref
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -653,7 +653,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) */ if (!(avctx->codec_type == AVMEDIA_TYPE_VIDEO && avctx->codec)) { if (ost->frame_number >= ost->max_frames) { - av_free_packet(pkt); + av_packet_unref(pkt); return; } ost->frame_number++; @@ -700,7 +700,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) if (a > 0) { pkt->side_data = NULL; pkt->side_data_elems = 0; - av_free_packet(pkt); + av_packet_unref(pkt); new_pkt.buf = av_buffer_create(new_pkt.data, new_pkt.size, av_buffer_default_free, NULL, 0); if (!new_pkt.buf) @@ -777,7 +777,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) main_return_code = 1; close_all_output_streams(ost, MUXER_FINISHED | ENCODER_FINISHED, ENCODER_FINISHED); } - av_free_packet(pkt); + av_packet_unref(pkt); } static void close_output_stream(OutputStream *ost) @@ -1754,7 +1754,7 @@ static void flush_encoders(void) break; } if (ost->finished & MUXER_FINISHED) { - av_free_packet(&pkt); + av_packet_unref(&pkt); continue; } av_packet_rescale_ts(&pkt, enc->time_base, ost->st->time_base); @@ -3521,7 +3521,7 @@ static void *input_thread(void *arg) av_log(f->ctx, AV_LOG_ERROR, "Unable to send packet to main thread: %s\n", av_err2str(ret)); - av_free_packet(&pkt); + av_packet_unref(&pkt); av_thread_message_queue_set_err_recv(f->in_thread_queue, ret); break; } @@ -3542,7 +3542,7 @@ static void free_input_threads(void) continue; av_thread_message_queue_set_err_send(f->in_thread_queue, AVERROR_EOF); while (av_thread_message_queue_recv(f->in_thread_queue, &pkt, 0) >= 0) - av_free_packet(&pkt); + av_packet_unref(&pkt); pthread_join(f->thread, NULL); f->joined = 1; @@ -3945,7 +3945,7 @@ static int process_input(int file_index) process_input_packet(ist, &pkt, 0); discard_packet: - av_free_packet(&pkt); + av_packet_unref(&pkt); return 0; } |