summaryrefslogtreecommitdiff
path: root/libavformat/latmenc.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-09 00:57:11 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-12 20:28:37 +0200
commit0c1e9c2d6aa5ca10986b458863969ddb0424fb58 (patch)
tree75eef21567afd071284508dd67b8819fc4940423 /libavformat/latmenc.c
parent912a838efe090b0f70429265badfcb8144becded (diff)
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@gmx.de>
Diffstat (limited to 'libavformat/latmenc.c')
-rw-r--r--libavformat/latmenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index c296a1b116..3ee58e078c 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);
}
}