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

Kostya kostya.shishkov
Mon Mar 2 19:08:55 CET 2009


On Mon, Mar 02, 2009 at 10:15:00AM -0500, Ronald S. Bultje wrote:
> 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.

too bad that is an optional feature...

> > 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. :-).

It would be nice to have a maintainer for rmdec.c and I'll try to help you anyway.
 
> Ronald




More information about the ffmpeg-devel mailing list