Revision 576ae256 libavformat/utils.c

View differences:

libavformat/utils.c
1996 1996
 */
1997 1997
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
1998 1998
{
1999
    int ret;
2000

  
1999 2001
    compute_pkt_fields2(s->streams[pkt->stream_index], pkt);
2000 2002
    
2001 2003
    truncate_ts(s->streams[pkt->stream_index], pkt);
2002 2004

  
2003
    return s->oformat->write_packet(s, pkt);
2005
    ret= s->oformat->write_packet(s, pkt);
2006
    if(!ret)
2007
        ret= url_ferror(&s->pb);
2008
    return ret;
2004 2009
}
2005 2010

  
2006 2011
/**
......
2111 2116
        
2112 2117
        if(ret<0)
2113 2118
            return ret;
2119
        if(url_ferror(&s->pb))
2120
            return url_ferror(&s->pb);
2114 2121
    }
2115 2122
}
2116 2123

  
......
2139 2146
        
2140 2147
        if(ret<0)
2141 2148
            goto fail;
2149
        if(url_ferror(&s->pb))
2150
            goto fail;
2142 2151
    }
2143 2152

  
2144 2153
    ret = s->oformat->write_trailer(s);
2145 2154
fail:
2155
    if(ret == 0)
2156
       ret=url_ferror(&s->pb);
2146 2157
    for(i=0;i<s->nb_streams;i++)
2147 2158
        av_freep(&s->streams[i]->priv_data);
2148 2159
    av_freep(&s->priv_data);

Also available in: Unified diff