+ avctx->sample_rate = ctx->sample_rate;
+ avctx->block_align = ctx->frame_size;
+ avctx->bit_rate = ctx->sample_rate * ctx->frame_size * 8 / 2048;
+ avctx->channels = ff_oma_chid_to_num_channels[ctx->channel_id -
1];
+ avctx->channel_layout = ff_oma_chid_to_native_layout[ctx->channel_id -
1];
if you set these from the parser instead of the decoder then you
must be a bit careful as the decoder can run in a seperate thread as
the parser so the parser cannot change anything midstream it could
only set the parameters once before the decoder can start
(that is when the parameters where not set before)
Ok, I see. The problem is that ATRAC3+ streams will be added dynamically
in the demuxer. Stream parameters like frame_size or sample_rate seem to
be sent along with packets. I don't know whether they are available in
headers or not.
For the case I won't find any stream configuration before dealing with
packets, what's the right way to supply stream parameters to the decoder?
The whole parser thingy seems to be poorly documented so I don't know
where to proceed...
Best regards
Maxim
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel