changeset 31793:9fdee6f96925

Avoid code duplication, use the generate file name instead of generating it twice.
author reimar
date Fri, 30 Jul 2010 18:18:03 +0000
parents 55dacfca4a43
children 543698dab5d2
files libao2/ao_mpegpes.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_mpegpes.c	Fri Jul 30 18:14:35 2010 +0000
+++ b/libao2/ao_mpegpes.c	Fri Jul 30 18:18:03 2010 +0000
@@ -108,8 +108,8 @@
 static int init_device(int card)
 {
 	char ao_file[30];
-	mp_msg(MSGT_VO,MSGL_INFO, "Opening /dev/dvb/adapter%d/audio0\n", card);
 	sprintf(ao_file, "/dev/dvb/adapter%d/audio0", card);
+	mp_msg(MSGT_VO,MSGL_INFO, "Opening %s\n", ao_file);
 	if((vo_mpegpes_fd2 = open(ao_file,O_RDWR|O_NONBLOCK)) < 0)
 	{
         	mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO DEVICE: %s\n", strerror(errno));