Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-28 22:45:06 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-04-28 22:45:06 +0400
commit9d7c1b4cf36737bde226d0f7bb4e271e61e4e8a6 (patch)
tree07577504efcb323108e1fcb6d76499a863386589 /libavformat/segment.c
parentc31be45e144a5f4748c9b9d5b8802f254550a471 (diff)
parent9b9df1cdff149db5bbe6726b236934c5b5fbe21d (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: h264: new assembly version of get_cabac for x86_64 with PIC h264: use one table instead of several for cabac functions h264: (trivial) remove unneeded macro argument in x86/cabac.h libschroedingerdec: check malloc segment: reorder seg_write_header allocation avio: make avio_close(NULL) a no-op mov: Parse EC3SpecificBox (dec3 atom). Conflicts: libavcodec/cabac.c libavcodec/x86/cabac.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r--libavformat/segment.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 05f76a72c5..09949d7aeb 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -113,10 +113,15 @@ static int seg_write_header(AVFormatContext *s)
seg->offset_time = 0;
seg->recording_time = seg->time * 1000000;
+ oc = avformat_alloc_context();
+
+ if (!oc)
+ return AVERROR(ENOMEM);
+
if (seg->list)
if ((ret = avio_open2(&seg->pb, seg->list, AVIO_FLAG_WRITE,
&s->interrupt_callback, NULL)) < 0)
- return ret;
+ goto fail;
for (i = 0; i< s->nb_streams; i++)
seg->has_video +=
@@ -127,13 +132,6 @@ static int seg_write_header(AVFormatContext *s)
"More than a single video stream present, "
"expect issues decoding it.\n");
- oc = avformat_alloc_context();
-
- if (!oc) {
- ret = AVERROR(ENOMEM);
- goto fail;
- }
-
oc->oformat = av_guess_format(seg->format, s->filename, NULL);
if (!oc->oformat) {