On Mon, Jan 1, 2018 at 11:32 AM, <mi...@brew.sh> wrote: > ... > + 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 = oma_chid_to_num_channels[ctx->channel_id - > 1]; > + avctx->channel_layout = oma_chid_to_native_layout[ctx->channel_id - > 1]; > + > ...
Hi, I had at one point looked into working on this after the initial patch set failed to get merged as the AVCodecContext was modified in a parser and people were afraid about threading issues. Is this no longer an issue? Currently this design of the parser is based on the ATRAC3+ decoder's design, which is built upon the WAV-like OMA format. That, in part, expects the demuxer to have filled all this information for it, and basically it would have required to either insert the headers utilized in the MPEG-PS encapsulation to every packet with OMA demux (and make the decoder not require these values in the AVCodecContext) - which would break any remuxing if such would take place unless those would be removed in the muxer, or the decoder would have to have two modes. One for the OMA-like (no header in packets), and the other for MPEG-PS encapsulation (header in each packet). I had asked on the -devel IRC channel regarding how to do it the best way a few times but never got a nice answer. > ... > + } else if (!memcmp("PSMF00", buffer, 6)) { > + m->sony_psmf = 1; > ... Games for the Sony PS3 seem to utilize the header "PAMF00" for the same purpose. I can share a sample on IRC (poke JEEB). Best regards, Jan _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel