aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-24 21:34:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-24 21:34:54 +0200
commit244682dd086233b71e885d2fb1ec0dd3396b94bc (patch)
tree6a314fbc579bad35bb666ee469d28e2b2872e57c /libavformat
parent5c44c2de8045ea0b9787a95053f542b1b3b860d2 (diff)
parent145a8096d53c20da7898539e521e6d4267ab2f09 (diff)
downloadffmpeg-244682dd086233b71e885d2fb1ec0dd3396b94bc.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: log: Only include unistd.h if configure found it ape: create audio stream before reading tags. mov: make a length variable larger. image2: Add "start_number" private option to the demuxer image2: Add "start_number" private option to the muxer avconv: remove a forgotten debugging printf. avconv: use more descriptive names for hardcoded filters. avconv: remove redundant handling of async. doc/filters: fix typo. h264: use asm cabac reader under a generic condition Conflicts: ffmpeg.c libavformat/img2dec.c libavformat/img2enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/ape.c12
-rw-r--r--libavformat/img2dec.c5
-rw-r--r--libavformat/img2enc.c3
-rw-r--r--libavformat/mov.c4
4 files changed, 13 insertions, 11 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index fff85c4edb..62c94780ec 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -315,12 +315,6 @@ static int ape_read_header(AVFormatContext * s)
ape_dumpinfo(s, ape);
- /* try to read APE tags */
- if (pb->seekable) {
- ff_ape_parse_tag(s);
- avio_seek(pb, 0, SEEK_SET);
- }
-
av_log(s, AV_LOG_DEBUG, "Decoding file - v%d.%02d, compression level %"PRIu16"\n",
ape->fileversion / 1000, (ape->fileversion % 1000) / 10,
ape->compressiontype);
@@ -357,6 +351,12 @@ static int ape_read_header(AVFormatContext * s)
pts += ape->blocksperframe / MAC_SUBFRAME_SIZE;
}
+ /* try to read APE tags */
+ if (pb->seekable) {
+ ff_ape_parse_tag(s);
+ avio_seek(pb, 0, SEEK_SET);
+ }
+
return 0;
}
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index f962ccfb7e..2844ae00c6 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -116,7 +116,7 @@ static int find_image_range(int *pfirst_index, int *plast_index,
int range, last_index, range1, first_index;
/* find the first image */
- for(first_index = max_start; first_index < max_start + 5; first_index++) {
+ for (first_index = max_start; first_index < max_start + 5; first_index++) {
if (av_get_frame_filename(buf, sizeof(buf), path, first_index) < 0){
*pfirst_index =
*plast_index = 1;
@@ -252,7 +252,8 @@ static int read_header(AVFormatContext *s1)
last_index = s->globstate.gl_pathc - 1;
#endif
} else {
- if (find_image_range(&first_index, &last_index, s->path, s->start_number - 1) < 0)
+ if (find_image_range(&first_index, &last_index, s->path,
+ s->start_number - 1) < 0)
return AVERROR(ENOENT);
}
s->img_first = first_index;
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 5dc7e1230f..58b4655139 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -27,6 +27,7 @@
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
+#include "libavutil/opt.h"
typedef struct {
const AVClass *class; /**< Class for private options. */
@@ -140,7 +141,6 @@ static const AVOption muxoptions[] = {
{ NULL },
};
-
#if CONFIG_IMAGE2_MUXER
static const AVClass img2mux_class = {
.class_name = "image2 muxer",
@@ -148,6 +148,7 @@ static const AVClass img2mux_class = {
.option = muxoptions,
.version = LIBAVUTIL_VERSION_INT,
};
+
AVOutputFormat ff_image2_muxer = {
.name = "image2",
.long_name = NULL_IF_CONFIG_SMALL("image2 sequence"),
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d686be6c52..af5b126261 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -175,8 +175,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#endif
char str[1024], key2[16], language[4] = {0};
const char *key = NULL;
- uint16_t str_size, langcode = 0;
- uint32_t data_type = 0;
+ uint16_t langcode = 0;
+ uint32_t data_type = 0, str_size;
int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL;
switch (atom.type) {