|
|
@ -616,11 +616,8 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
if (ret > 0) |
|
|
|
if (ret > 0) |
|
|
|
put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE); |
|
|
|
put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE); |
|
|
|
else { |
|
|
|
else |
|
|
|
uint8_t *buf; |
|
|
|
ffio_free_dyn_buf(&dyn_bc); |
|
|
|
avio_close_dyn_buf(dyn_bc, &buf); |
|
|
|
|
|
|
|
av_free(buf); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < nut->avf->nb_chapters; i++) { |
|
|
|
for (i = 0; i < nut->avf->nb_chapters; i++) { |
|
|
@ -629,9 +626,7 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
ret = write_chapter(nut, dyn_bc, i); |
|
|
|
ret = write_chapter(nut, dyn_bc, i); |
|
|
|
if (ret < 0) { |
|
|
|
if (ret < 0) { |
|
|
|
uint8_t *buf; |
|
|
|
ffio_free_dyn_buf(&dyn_bc); |
|
|
|
avio_close_dyn_buf(dyn_bc, &buf); |
|
|
|
|
|
|
|
av_freep(&buf); |
|
|
|
|
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE); |
|
|
|
put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE); |
|
|
|