Lines Matching refs:latmctx
284 static int latm_decode_audio_specific_config(struct LATMContext *latmctx, in latm_decode_audio_specific_config() argument
287 AACContext *ac = &latmctx->aac_ctx; in latm_decode_audio_specific_config()
320 if (!latmctx->initialized || in latm_decode_audio_specific_config()
324 if (latmctx->initialized) { in latm_decode_audio_specific_config()
329 latmctx->initialized = 0; in latm_decode_audio_specific_config()
352 static int read_stream_mux_config(struct LATMContext *latmctx, in read_stream_mux_config() argument
357 latmctx->audio_mux_version_A = 0; in read_stream_mux_config()
359 latmctx->audio_mux_version_A = get_bits(gb, 1); in read_stream_mux_config()
361 if (!latmctx->audio_mux_version_A) { in read_stream_mux_config()
370 avpriv_request_sample(latmctx->aac_ctx.avctx, "Multiple programs"); in read_stream_mux_config()
378 avpriv_request_sample(latmctx->aac_ctx.avctx, "Multiple layers"); in read_stream_mux_config()
384 if ((ret = latm_decode_audio_specific_config(latmctx, gb, 0)) < 0) in read_stream_mux_config()
388 if ((ret = latm_decode_audio_specific_config(latmctx, gb, ascLen)) < 0) in read_stream_mux_config()
392 latmctx->frame_length_type = get_bits(gb, 3); in read_stream_mux_config()
393 switch (latmctx->frame_length_type) { in read_stream_mux_config()
398 latmctx->frame_length = get_bits(gb, 9); in read_stream_mux_config()
455 static int read_audio_mux_element(struct LATMContext *latmctx, in read_audio_mux_element() argument
461 if ((err = read_stream_mux_config(latmctx, gb)) < 0) in read_audio_mux_element()
463 } else if (!latmctx->aac_ctx.avctx->extradata) { in read_audio_mux_element()
464 av_log(latmctx->aac_ctx.avctx, AV_LOG_DEBUG, in read_audio_mux_element()
468 if (latmctx->audio_mux_version_A == 0) { in read_audio_mux_element()
469 int mux_slot_length_bytes = read_payload_length_info(latmctx, gb); in read_audio_mux_element()
471 av_log(latmctx->aac_ctx.avctx, AV_LOG_ERROR, "incomplete frame\n"); in read_audio_mux_element()
474 av_log(latmctx->aac_ctx.avctx, AV_LOG_ERROR, in read_audio_mux_element()
487 struct LATMContext *latmctx = avctx->priv_data; in latm_decode_frame() local
503 if ((err = read_audio_mux_element(latmctx, &gb))) in latm_decode_frame()
506 if (!latmctx->initialized) { in latm_decode_frame()
511 push_output_configuration(&latmctx->aac_ctx); in latm_decode_frame()
513 &latmctx->aac_ctx, avctx, &latmctx->aac_ctx.oc[1].m4ac, in latm_decode_frame()
515 pop_output_configuration(&latmctx->aac_ctx); in latm_decode_frame()
518 latmctx->initialized = 1; in latm_decode_frame()
523 av_log(latmctx->aac_ctx.avctx, AV_LOG_ERROR, in latm_decode_frame()
529 switch (latmctx->aac_ctx.oc[1].m4ac.object_type) { in latm_decode_frame()
547 struct LATMContext *latmctx = avctx->priv_data; in latm_decode_init() local
551 latmctx->initialized = !ret; in latm_decode_init()