[01/13] lavf/utils: dont't explicitly check AVIOContext.error

Message ID 1300131546-2880-1-git-send-email-anton@khirnov.net
State Committed
Headers show

Commit Message

Anton Khirnov March 14, 2011, 7:38 p.m.
The error should be caught in write_packet()/write_trailer()
---
 libavformat/utils.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

Comments

Ronald Bultje March 15, 2011, 12:15 p.m. | #1
Hi,

On Mon, Mar 14, 2011 at 3:38 PM, Anton Khirnov <anton@khirnov.net> wrote:
> The error should be caught in write_packet()/write_trailer()
> ---
>  libavformat/utils.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)

Yep, make fate works now without url_ferror(), thanks for fixing, pushed.

Ronald

Patch

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 918b07d..902a170 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2988,8 +2988,6 @@  int av_write_frame(AVFormatContext *s, AVPacket *pkt)
         return ret;
 
     ret= s->oformat->write_packet(s, pkt);
-    if(!ret)
-        ret= url_ferror(s->pb);
     return ret;
 }
 
@@ -3111,8 +3109,6 @@  int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
 
         if(ret<0)
             return ret;
-        if(url_ferror(s->pb))
-            return url_ferror(s->pb);
     }
 }
 
@@ -3134,15 +3130,11 @@  int av_write_trailer(AVFormatContext *s)
 
         if(ret<0)
             goto fail;
-        if(url_ferror(s->pb))
-            goto fail;
     }
 
     if(s->oformat->write_trailer)
         ret = s->oformat->write_trailer(s);
 fail:
-    if(ret == 0)
-       ret=url_ferror(s->pb);
     for(i=0;i<s->nb_streams;i++) {
         av_freep(&s->streams[i]->priv_data);
         av_freep(&s->streams[i]->index_entries);