All pastes #99982 Raw Edit

dual audio avi

public text v1 · immutable
#99982 ·published 2006-07-25 20:10 UTC
rendered paste body
Index: ff_private.c
===================================================================
--- ff_private.c        (revision 51)
+++ ff_private.c        (working copy)
@@ -378,6 +378,7 @@
        AVStream *st;
        NCStream *map;
        Track track;
+       Track firstAudioTrack = NULL;
 
        /* make the stream map structure */
        map = av_mallocz(ic->nb_streams * sizeof(NCStream));
@@ -394,6 +395,11 @@
                } else {
                        track = NewMovieTrack(theMovie, 0, 0, kFullVolume);
                        initialize_audio_map(&map[j], track, dataRef, dataRefType);
+
+                       if (firstAudioTrack == NULL)
+                               firstAudioTrack = track;
+                       else
+                               SetTrackAlternate(track, firstAudioTrack);
                }
        }