I had a problem with mythtranscode and "Martin Yan: Quick & Easy Stir
Fry", aired on PBS. The properties of my recording were such that
AvFormatDecoder::autoSelectAudioTrack entered an infinite loop.

The attached patch fixes the problem for me, but I'm not 100%
confident in it being 100% applicable to all recordings, because I'm
not too familiar with all the data structures involved here.

Thanks,
--Rob
Index: libs/libmythtv/avformatdecoder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/avformatdecoder.cpp,v
retrieving revision 1.151
diff -u -r1.151 avformatdecoder.cpp
--- libs/libmythtv/avformatdecoder.cpp  3 Jun 2005 18:21:36 -0000       1.151
+++ libs/libmythtv/avformatdecoder.cpp  16 Jun 2005 22:21:24 -0000
@@ -1350,15 +1350,15 @@
                     selectedTrack = track;
                     break;
                 }
+            }
 
-                if (e->channels > selectedChannels)
-                {
-                    // this is a candidate with more channels
-                    // than the previous, or there was no previous
-                    // so select it.
-                    selectedChannels = e->channels;
-                    selectedTrack = track;
-                }
+            if (e->channels > selectedChannels)
+            {
+                // this is a candidate with more channels
+                // than the previous, or there was no previous
+                // so select it.
+                selectedChannels = e->channels;
+                selectedTrack = track;
             }
         }
         if (selectedTrack > maxTracks)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to