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:
parent
57df8839e1
commit
beb7f93b23
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user