Commit dc5e72a3 authored by stefano's avatar stefano

Make write_header() and write_header() return an error code in case of

error.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23432 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2bc7b340
...@@ -520,7 +520,8 @@ static int write_headers(AVFormatContext *avctx, ByteIOContext *bc){ ...@@ -520,7 +520,8 @@ static int write_headers(AVFormatContext *avctx, ByteIOContext *bc){
ret = url_open_dyn_buf(&dyn_bc); ret = url_open_dyn_buf(&dyn_bc);
if(ret < 0) if(ret < 0)
return ret; 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); put_packet(nut, bc, dyn_bc, 1, STREAM_STARTCODE);
} }
...@@ -554,7 +555,7 @@ static int write_headers(AVFormatContext *avctx, ByteIOContext *bc){ ...@@ -554,7 +555,7 @@ static int write_headers(AVFormatContext *avctx, ByteIOContext *bc){
static int write_header(AVFormatContext *s){ static int write_header(AVFormatContext *s){
NUTContext *nut = s->priv_data; NUTContext *nut = s->priv_data;
ByteIOContext *bc = s->pb; ByteIOContext *bc = s->pb;
int i, j; int i, j, ret;
nut->avf= s; nut->avf= s;
...@@ -594,7 +595,8 @@ static int write_header(AVFormatContext *s){ ...@@ -594,7 +595,8 @@ static int write_header(AVFormatContext *s){
put_buffer(bc, ID_STRING, strlen(ID_STRING)); put_buffer(bc, ID_STRING, strlen(ID_STRING));
put_byte(bc, 0); put_byte(bc, 0);
write_headers(s, bc); if ((ret = write_headers(s, bc)) < 0)
return ret;
put_flush_packet(bc); put_flush_packet(bc);
......
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