[FFmpeg-devel] [PATCH] Handle AAC in RM similar to other audio codecs

Michael Niedermayer michaelni
Fri Feb 6 23:34:05 CET 2009


On Wed, Feb 04, 2009 at 09:06:59AM +0200, Kostya wrote:
> On Tue, Feb 03, 2009 at 05:23:59PM +0200, Kostya wrote:
> > On Tue, Feb 03, 2009 at 02:06:40PM +0100, Michael Niedermayer wrote:
> > > On Tue, Feb 03, 2009 at 09:57:02AM +0200, Kostya wrote:
> > > > With this patch RM demuxer handles AAC in the same way as other audio codecs -
> > > > it loads it into temporary buffer and passes chunks from it as requested.
> > > > (Demuxer still should be cleaned, refactored and maybe rewritten from scratch)
> > > > 
> > > > This patch also fixes -an behaviour with AAC sound.
> > > 
> > > your patch makes the demuxer more complex not less
> > > also it appears that an additional copy pass is added (if so this is a
> > > immedeate reason for rejection)
> > 
> > Another reason to rewrite this demuxer from scratch...
> 
> Well, how's this approach (like video frames)?
> I think I can convert other audio codec handling to be like this
> (hence no temporary buffer and one copy less for them). 

this too is more complex than it was, if you can reduce complexity this
is welcome, if you can make it faster this is welcome as well.

to fix your bug, try:

Index: libavformat/rmdec.c
===================================================================
--- libavformat/rmdec.c	(revision 17003)
+++ libavformat/rmdec.c	(working copy)
@@ -650,6 +650,7 @@
     if(  (st->discard >= AVDISCARD_NONKEY && !(*flags&2))
        || st->discard >= AVDISCARD_ALL){
         av_free_packet(pkt);
+        rm->audio_pkt_cnt= 0;
         return -1;
     }
 
ive not tested it as i have no aac+rv file

and about rewriting from scratch, first you have to understand the code
to judge that it is worse than what you have in mind.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090206/e3ae733a/attachment.pgp>



More information about the ffmpeg-devel mailing list