[FFmpeg-cvslog] latmenc: copy pce config from proper location.

Reimar Döffinger git at videolan.org
Thu Apr 12 20:32:48 CEST 2012


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Mon Apr  9 00:57:11 2012 +0200| [0c1e9c2d6aa5ca10986b458863969ddb0424fb58] | committer: Reimar Döffinger

latmenc: copy pce config from proper location.

For the FATE test sample used, this only avoids a warning
message.
However for other samples like al05_44.mp4 the converted
file can be played only after this fix.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c1e9c2d6aa5ca10986b458863969ddb0424fb58
---

 libavformat/latmenc.c    |    6 +++---
 tests/ref/lavf-fate/latm |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index c296a1b..3ee58e0 100644
--- a/libavformat/latmenc.c
+++ b/libavformat/latmenc.c
@@ -93,15 +93,12 @@ static void latm_write_frame_header(AVFormatContext *s, PutBitContext *bs)
 {
     LATMContext *ctx = s->priv_data;
     AVCodecContext *avctx = s->streams[0]->codec;
-    GetBitContext gb;
     int header_size;
 
     /* AudioMuxElement */
     put_bits(bs, 1, !!ctx->counter);
 
     if (!ctx->counter) {
-        init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8);
-
         /* StreamMuxConfig */
         put_bits(bs, 1, 0); /* audioMuxVersion */
         put_bits(bs, 1, 1); /* allStreamsSameTimeFraming */
@@ -117,6 +114,9 @@ static void latm_write_frame_header(AVFormatContext *s, PutBitContext *bs)
             avpriv_copy_bits(bs, avctx->extradata, ctx->off + 3);
 
             if (!ctx->channel_conf) {
+                GetBitContext gb;
+                init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8);
+                skip_bits_long(&gb, ctx->off + 3);
                 avpriv_copy_pce_data(bs, &gb);
             }
         }
diff --git a/tests/ref/lavf-fate/latm b/tests/ref/lavf-fate/latm
index 3679277..8c4f541 100644
--- a/tests/ref/lavf-fate/latm
+++ b/tests/ref/lavf-fate/latm
@@ -1,3 +1,3 @@
-9c8d1afdb2d336976102f175ba577471 *./tests/data/lavf-fate/lavf.latm
-71926 ./tests/data/lavf-fate/lavf.latm
-./tests/data/lavf-fate/lavf.latm CRC=0xd846c4b3
+eb13788e71c9b5bc7d62ceb748312bbb *./tests/data/lavf-fate/lavf.latm
+67876 ./tests/data/lavf-fate/lavf.latm
+./tests/data/lavf-fate/lavf.latm CRC=0xcf94c59d



More information about the ffmpeg-cvslog mailing list