summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-25 02:29:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-25 02:29:09 +0200
commit989fb05fe344d9666db858e0577c44969625184e (patch)
tree294cb628ae90187c545eb7b0a28de2d304898888 /libavformat
parent2671ab3996672c43b02076daca5bf00c5a6f1c68 (diff)
parent2441003d3fdc01545690c2f397efd7acfd876d6c (diff)
Merge remote branch 'qatar/master'
* qatar/master: vorbisdec: Employ proper printf format specifiers for uint_fast32_t. applehttp: Don't export variant_bitrate if it isn't known crypto: Use av_freep instead of av_free configure: Add missing libm library dependencies to .pc files. oggdec: reindent after 8f3eebd6 configure: Add missing libavutil inter-library dependencies to .pc files. Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/applehttp.c4
-rw-r--r--libavformat/crypto.c6
-rw-r--r--libavformat/oggdec.c14
3 files changed, 13 insertions, 11 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 93d4f73295..4429ad0199 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -505,7 +505,9 @@ static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap)
goto fail;
}
avcodec_copy_context(st->codec, v->ctx->streams[j]->codec);
- av_metadata_set2(&st->metadata, "variant_bitrate", bitrate_str, 0);
+ if (v->bandwidth)
+ av_metadata_set2(&st->metadata, "variant_bitrate", bitrate_str,
+ 0);
}
stream_offset += v->ctx->nb_streams;
}
diff --git a/libavformat/crypto.c b/libavformat/crypto.c
index ea6012ad09..fecc2c961c 100644
--- a/libavformat/crypto.c
+++ b/libavformat/crypto.c
@@ -153,9 +153,9 @@ static int crypto_close(URLContext *h)
CryptoContext *c = h->priv_data;
if (c->hd)
ffurl_close(c->hd);
- av_free(c->aes);
- av_free(c->key);
- av_free(c->iv);
+ av_freep(&c->aes);
+ av_freep(&c->key);
+ av_freep(&c->iv);
return 0;
}
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 2f76ec8871..29e4907e86 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -243,14 +243,14 @@ ogg_read_page (AVFormatContext * s, int *str)
idx = ogg_find_stream (ogg, serial);
if (idx < 0){
if (ogg->headers) {
- int n;
+ int n;
- for (n = 0; n < ogg->nstreams; n++) {
- av_freep(&ogg->streams[n].buf);
- av_freep(&ogg->streams[n].private);
- }
- ogg->curidx = -1;
- ogg->nstreams = 0;
+ for (n = 0; n < ogg->nstreams; n++) {
+ av_freep(&ogg->streams[n].buf);
+ av_freep(&ogg->streams[n].private);
+ }
+ ogg->curidx = -1;
+ ogg->nstreams = 0;
}
idx = ogg_new_stream (s, serial);
if (idx < 0)