[FFmpeg-devel] [PATCH 04/14] lavf/mux: run AVCodec::deinit if write_header fails
Rodger Combs
rodger.combs at gmail.com
Sun Jun 12 23:32:46 CEST 2016
> On Jun 12, 2016, at 16:24, Marton Balint <cus at passwd.hu> wrote:
>
>
> On Sun, 12 Jun 2016, Rodger Combs wrote:
>
>> ---
>> libavformat/mux.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/mux.c b/libavformat/mux.c
>> index dd3de24..071eac1 100644
>> --- a/libavformat/mux.c
>> +++ b/libavformat/mux.c
>> @@ -484,8 +484,11 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
>> ret = s->oformat->write_header(s);
>> if (ret >= 0 && s->pb && s->pb->error < 0)
>> ret = s->pb->error;
>> - if (ret < 0)
>> + if (ret < 0) {
>> + if (s->oformat->deinit)
>> + s->oformat->deinit(s);
>> return ret;
>> + }
>> if (s->flush_packets && s->pb && s->pb->error >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS)
>> avio_flush(s->pb);
>> s->internal->header_written = 1;
>> --
>
> I already have a patch for this, and also a few other mux fixes, I'd like apply those first if that is OK.
Fine with me.
>
> Thanks,
> Marton
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org <mailto:ffmpeg-devel at ffmpeg.org>
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel <http://ffmpeg.org/mailman/listinfo/ffmpeg-devel>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3579 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160612/8e5c830a/attachment.bin>
More information about the ffmpeg-devel
mailing list