1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/img2enc: minor simplification

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2019-12-26 22:58:45 +01:00
parent 57df8839e1
commit beb7f93b23

View File

@ -92,18 +92,16 @@ static int write_muxed_file(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
st->id = pkt->stream_index;
fmt->pb = pb;
if ((ret = av_packet_ref(&pkt2, pkt)) < 0 ||
(ret = avcodec_parameters_copy(st->codecpar, par)) < 0 ||
(ret = avformat_write_header(fmt, NULL)) < 0 ||
(ret = av_interleaved_write_frame(fmt, &pkt2)) < 0 ||
(ret = av_write_trailer(fmt)) < 0) {
av_packet_unref(&pkt2);
avformat_free_context(fmt);
return ret;
}
(ret = av_write_trailer(fmt))) {}
av_packet_unref(&pkt2);
avformat_free_context(fmt);
return 0;
return ret;
}
static int write_packet_pipe(AVFormatContext *s, AVPacket *pkt)