[FFmpeg-devel] [PATCH] Make RM demuxer behave better with -an option

Ronald S. Bultje rsbultje
Mon Mar 2 16:15:00 CET 2009


Hi Kostya,

On Mon, Mar 2, 2009 at 10:07 AM, Kostya <kostya.shishkov at gmail.com> wrote:
> oh, and I think returning
> first subpacket from reassembled audio frame is not needed too (cache will
> handle it).

I'll implement this in a bit.

> 2) Packet reading should be more sane - with index support,

I already had a patch for that, will do that also.

> synchronizing to
> the next packet header and actual packet parsing could be merged into one and
> put into loop like:
> ?for(;;){
> ?if(have_cached_audio)
> ? return ff_read_cache();
> ?if(parse_packet())
> ? return 0;
> ?}
>
> parse_packet(){
> ?if(!partial_packet)
> ?sync_to_next_packet_header();
> ?if(video)
> ?assemble_video_frame();
> ?else if(braindead_audio)
> ?assemble_audio_frame();
> ?else
> ?read this packet and return it
> }
>
> assemble_audio_frame(){
> ?for(i = 0; i < ast->subpackets_in_packet; i++)
> ?get_buffer(ast->pkt->data + subpacket_size * (i * A + ast->packet_num * B), subpacket_size);
> ?ast->packet_num++;
> }

I'll try to work out and see which loops are easy to merge without
causing other headaches. Help is appreciated. :-).

Ronald




More information about the ffmpeg-devel mailing list