You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
fftools/ffmpeg: Remove unnecessary av_packet_unref()
avcodec_receive_packet() already unreferences the packet on its own. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1033,7 +1033,6 @@ static void do_audio_out(OutputFile *of, OutputStream *ost,
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
av_packet_unref(pkt);
|
|
||||||
ret = avcodec_receive_packet(enc, pkt);
|
ret = avcodec_receive_packet(enc, pkt);
|
||||||
if (ret == AVERROR(EAGAIN))
|
if (ret == AVERROR(EAGAIN))
|
||||||
break;
|
break;
|
||||||
@@ -1378,7 +1377,6 @@ static void do_video_out(OutputFile *of,
|
|||||||
av_frame_remove_side_data(in_picture, AV_FRAME_DATA_A53_CC);
|
av_frame_remove_side_data(in_picture, AV_FRAME_DATA_A53_CC);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
av_packet_unref(pkt);
|
|
||||||
ret = avcodec_receive_packet(enc, pkt);
|
ret = avcodec_receive_packet(enc, pkt);
|
||||||
update_benchmark("encode_video %d.%d", ost->file_index, ost->index);
|
update_benchmark("encode_video %d.%d", ost->file_index, ost->index);
|
||||||
if (ret == AVERROR(EAGAIN))
|
if (ret == AVERROR(EAGAIN))
|
||||||
@@ -1997,7 +1995,6 @@ static void flush_encoders(void)
|
|||||||
|
|
||||||
update_benchmark(NULL);
|
update_benchmark(NULL);
|
||||||
|
|
||||||
av_packet_unref(pkt);
|
|
||||||
while ((ret = avcodec_receive_packet(enc, pkt)) == AVERROR(EAGAIN)) {
|
while ((ret = avcodec_receive_packet(enc, pkt)) == AVERROR(EAGAIN)) {
|
||||||
ret = avcodec_send_frame(enc, NULL);
|
ret = avcodec_send_frame(enc, NULL);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
Reference in New Issue
Block a user