Commit 75b9ed04 authored by Anton Khirnov's avatar Anton Khirnov Committed by Ronald S. Bultje

lavf/utils: dont't explicitly check AVIOContext.error

The error should be caught in write_packet()/write_trailer()
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent 025225d7
...@@ -2988,8 +2988,6 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt) ...@@ -2988,8 +2988,6 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
return ret; return ret;
ret= s->oformat->write_packet(s, pkt); ret= s->oformat->write_packet(s, pkt);
if(!ret)
ret= url_ferror(s->pb);
return ret; return ret;
} }
...@@ -3111,8 +3109,6 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){ ...@@ -3111,8 +3109,6 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
if(ret<0) if(ret<0)
return ret; return ret;
if(url_ferror(s->pb))
return url_ferror(s->pb);
} }
} }
...@@ -3134,15 +3130,11 @@ int av_write_trailer(AVFormatContext *s) ...@@ -3134,15 +3130,11 @@ int av_write_trailer(AVFormatContext *s)
if(ret<0) if(ret<0)
goto fail; goto fail;
if(url_ferror(s->pb))
goto fail;
} }
if(s->oformat->write_trailer) if(s->oformat->write_trailer)
ret = s->oformat->write_trailer(s); ret = s->oformat->write_trailer(s);
fail: fail:
if(ret == 0)
ret=url_ferror(s->pb);
for(i=0;i<s->nb_streams;i++) { for(i=0;i<s->nb_streams;i++) {
av_freep(&s->streams[i]->priv_data); av_freep(&s->streams[i]->priv_data);
av_freep(&s->streams[i]->index_entries); av_freep(&s->streams[i]->index_entries);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment