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

Michael Niedermayer michaelni
Mon Feb 2 19:46:15 CET 2009


On Mon, Feb 02, 2009 at 09:19:06PM +0200, Kostya wrote:
> The story so far:
>  FFmpeg now has RV30, RV40 (my fault) and AAC (not my fault) support. When
> trying to decode RV40+AAC RM file with -an option video decoder produces
> a lot of garbage and may crash. As I've investigated, that happens because
> with -an option specified RM demuxer begins to feed audio packets to video
> decoder.

summary: rm demuxer doenst want to waste food


> 
>  With this patch demuxer resets the number of pending audio packets (so they
> won't be demuxed) and skips them (syncing to the next packet header tends to
> produce false positive matches somewhere inside packet data).

> Index: libavformat/rmdec.c
> ===================================================================
> --- libavformat/rmdec.c	(revision 16915)
> +++ libavformat/rmdec.c	(working copy)
> @@ -650,6 +650,12 @@
>      if(  (st->discard >= AVDISCARD_NONKEY && !(*flags&2))
>         || st->discard >= AVDISCARD_ALL){
>          av_free_packet(pkt);
> +        if(st->codec->codec_id == CODEC_ID_AAC && st->discard >= AVDISCARD_ALL){

why the AAC check?

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20090202/3de66074/attachment.pgp>



More information about the ffmpeg-devel mailing list