[mythtv] [patch] two small fixes

mian mythtv at mian.net.au
Wed Mar 17 01:49:24 EST 2004


dvbchannel fix ensures the chanid being retrieved for the specified
channel belongs to a DVB source, this fixes the case where you have two
channel numbers the same, one on V4L and one on DVB and if the V4L one was
first in the database it would be retrieved instead.

audiooutputalsa fix makes sure the soundcard is closed if Reconfigure
failed, on my system using ALSA:iec958, when the SetParameters call failed
due to not being able to set the rate or number of channels the handle
would be left open in limbo and would remain blocked in use so Xine and
future tv watching is unable to access the device until mythfrontend's
process is closed/restarted.
-------------- next part --------------
Index: libs/libmythtv/dvbchannel.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/dvbchannel.cpp,v
retrieving revision 1.21
diff -u -r1.21 dvbchannel.cpp
--- libs/libmythtv/dvbchannel.cpp	13 Mar 2004 08:57:21 -0000	1.21
+++ libs/libmythtv/dvbchannel.cpp	17 Mar 2004 06:39:33 -0000
@@ -219,7 +219,7 @@
     pthread_mutex_lock(db_lock);
     MythContext::KickDatabase(db_conn);
 
-    thequery = QString("SELECT chanid FROM channel WHERE channum='%1'")
+    thequery = QString("SELECT chanid FROM channel,cardinput,capturecard WHERE channum='%1' && cardinput.sourceid = channel.sourceid && capturecard.cardid = cardinput.cardid && capturecard.cardtype = 'DVB'")
                        .arg(channum);
     query = db_conn->exec(thequery);
 
-------------- next part --------------
Index: libs/libmyth/audiooutputalsa.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/audiooutputalsa.cpp,v
retrieving revision 1.5
diff -u -r1.5 audiooutputalsa.cpp
--- libs/libmyth/audiooutputalsa.cpp	20 Feb 2004 18:57:32 -0000	1.5
+++ libs/libmyth/audiooutputalsa.cpp	17 Mar 2004 06:40:57 -0000
@@ -71,8 +71,10 @@
     err = SetParameters(new_pcm_handle, SND_PCM_ACCESS_MMAP_INTERLEAVED,
                         format, audio_channels, audio_samplerate, buffer_time,
                         period_time, &can_hw_pause);
-    if(err < 0)
+    if(err < 0) {
+        snd_pcm_close(new_pcm_handle);
         return;
+    }
     
     effdsp = audio_samplerate * 100;
     


More information about the mythtv-dev mailing list