Browse code

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>

Michael Niedermayer authored on 2011/04/25 09:29:09
Showing 5 changed files
... ...
@@ -2874,7 +2874,7 @@ for thread in $THREADS_LIST; do
2874 2874
     fi
2875 2875
 done
2876 2876
 
2877
-check_lib math.h sin -lm
2877
+check_lib math.h sin -lm && LIBM="-lm"
2878 2878
 disabled crystalhd || check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd || disable crystalhd
2879 2879
 enabled vaapi && require vaapi va/va.h vaInitialize -lva
2880 2880
 
... ...
@@ -3485,10 +3485,10 @@ Cflags: -I\${includedir}
3485 3485
 EOF
3486 3486
 }
3487 3487
 
3488
-pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION"
3489
-pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs"
3488
+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBM"
3489
+pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs $LIBM" "libavutil = $LIBAVUTIL_VERSION"
3490 3490
 pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
3491 3491
 pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
3492 3492
 pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
3493
-pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
3494
-pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
3493
+pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
3494
+pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
... ...
@@ -539,7 +539,7 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
539 539
             rangemax = (1 << rangebits);
540 540
             if (rangemax > vc->blocksize[1] / 2) {
541 541
                 av_log(vc->avccontext, AV_LOG_ERROR,
542
-                       "Floor value is too large for blocksize: %d (%d)\n",
542
+                       "Floor value is too large for blocksize: %"PRIuFAST32" (%"PRIuFAST32")\n",
543 543
                        rangemax, vc->blocksize[1] / 2);
544 544
                 return -1;
545 545
             }
... ...
@@ -505,7 +505,9 @@ static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap)
505 505
                 goto fail;
506 506
             }
507 507
             avcodec_copy_context(st->codec, v->ctx->streams[j]->codec);
508
-            av_metadata_set2(&st->metadata, "variant_bitrate", bitrate_str, 0);
508
+            if (v->bandwidth)
509
+                av_metadata_set2(&st->metadata, "variant_bitrate", bitrate_str,
510
+                                 0);
509 511
         }
510 512
         stream_offset += v->ctx->nb_streams;
511 513
     }
... ...
@@ -153,9 +153,9 @@ static int crypto_close(URLContext *h)
153 153
     CryptoContext *c = h->priv_data;
154 154
     if (c->hd)
155 155
         ffurl_close(c->hd);
156
-    av_free(c->aes);
157
-    av_free(c->key);
158
-    av_free(c->iv);
156
+    av_freep(&c->aes);
157
+    av_freep(&c->key);
158
+    av_freep(&c->iv);
159 159
     return 0;
160 160
 }
161 161
 
... ...
@@ -243,14 +243,14 @@ ogg_read_page (AVFormatContext * s, int *str)
243 243
     idx = ogg_find_stream (ogg, serial);
244 244
     if (idx < 0){
245 245
         if (ogg->headers) {
246
-                int n;
246
+            int n;
247 247
 
248
-                for (n = 0; n < ogg->nstreams; n++) {
249
-                    av_freep(&ogg->streams[n].buf);
250
-                    av_freep(&ogg->streams[n].private);
251
-                }
252
-                ogg->curidx   = -1;
253
-                ogg->nstreams = 0;
248
+            for (n = 0; n < ogg->nstreams; n++) {
249
+                av_freep(&ogg->streams[n].buf);
250
+                av_freep(&ogg->streams[n].private);
251
+            }
252
+            ogg->curidx   = -1;
253
+            ogg->nstreams = 0;
254 254
         }
255 255
         idx = ogg_new_stream (s, serial);
256 256
         if (idx < 0)