mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
Replace remaining occurances of av_free_packet with av_packet_unref
This commit is contained in:
@@ -95,7 +95,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
|
||||
av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h);
|
||||
|
||||
end:
|
||||
av_free_packet(&pkt);
|
||||
av_packet_unref(&pkt);
|
||||
avcodec_close(codec_ctx);
|
||||
avformat_close_input(&format_ctx);
|
||||
av_frame_free(&frame);
|
||||
|
||||
@@ -490,7 +490,7 @@ static int movie_push_frame(AVFilterContext *ctx, unsigned out_id)
|
||||
pkt_out_id = pkt->stream_index > movie->max_stream_index ? -1 :
|
||||
movie->out_index[pkt->stream_index];
|
||||
if (pkt_out_id < 0) {
|
||||
av_free_packet(&movie->pkt0);
|
||||
av_packet_unref(&movie->pkt0);
|
||||
pkt->size = 0; /* ready for next run */
|
||||
pkt->data = NULL;
|
||||
return 0;
|
||||
@@ -517,7 +517,7 @@ static int movie_push_frame(AVFilterContext *ctx, unsigned out_id)
|
||||
if (ret < 0) {
|
||||
av_log(ctx, AV_LOG_WARNING, "Decode error: %s\n", av_err2str(ret));
|
||||
av_frame_free(&frame);
|
||||
av_free_packet(&movie->pkt0);
|
||||
av_packet_unref(&movie->pkt0);
|
||||
movie->pkt.size = 0;
|
||||
movie->pkt.data = NULL;
|
||||
return 0;
|
||||
@@ -528,7 +528,7 @@ static int movie_push_frame(AVFilterContext *ctx, unsigned out_id)
|
||||
pkt->data += ret;
|
||||
pkt->size -= ret;
|
||||
if (pkt->size <= 0) {
|
||||
av_free_packet(&movie->pkt0);
|
||||
av_packet_unref(&movie->pkt0);
|
||||
pkt->size = 0; /* ready for next run */
|
||||
pkt->data = NULL;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
|
||||
mcdeint->parity ^= 1;
|
||||
|
||||
end:
|
||||
av_free_packet(&pkt);
|
||||
av_packet_unref(&pkt);
|
||||
av_frame_free(&inpic);
|
||||
if (ret < 0) {
|
||||
av_frame_free(&outpic);
|
||||
|
||||
@@ -444,7 +444,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
av_free_packet(&pkt);
|
||||
av_packet_unref(&pkt);
|
||||
avsubtitle_free(&sub);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user