[FFmpeg-cvslog] r23432 - trunk/libavformat/nutenc.c
stefano
subversion
Wed Jun 2 23:57:35 CEST 2010
Author: stefano
Date: Wed Jun 2 23:57:35 2010
New Revision: 23432
Log:
Make write_header() and write_header() return an error code in case of
error.
Modified:
trunk/libavformat/nutenc.c
Modified: trunk/libavformat/nutenc.c
==============================================================================
--- trunk/libavformat/nutenc.c Wed Jun 2 23:57:30 2010 (r23431)
+++ trunk/libavformat/nutenc.c Wed Jun 2 23:57:35 2010 (r23432)
@@ -520,7 +520,8 @@ static int write_headers(AVFormatContext
ret = url_open_dyn_buf(&dyn_bc);
if(ret < 0)
return ret;
- write_streamheader(avctx, dyn_bc, nut->avf->streams[i], i);
+ if ((ret = write_streamheader(avctx, dyn_bc, nut->avf->streams[i], i)) < 0)
+ return ret;
put_packet(nut, bc, dyn_bc, 1, STREAM_STARTCODE);
}
@@ -554,7 +555,7 @@ static int write_headers(AVFormatContext
static int write_header(AVFormatContext *s){
NUTContext *nut = s->priv_data;
ByteIOContext *bc = s->pb;
- int i, j;
+ int i, j, ret;
nut->avf= s;
@@ -594,7 +595,8 @@ static int write_header(AVFormatContext
put_buffer(bc, ID_STRING, strlen(ID_STRING));
put_byte(bc, 0);
- write_headers(s, bc);
+ if ((ret = write_headers(s, bc)) < 0)
+ return ret;
put_flush_packet(bc);
More information about the ffmpeg-cvslog
mailing list