Hi,
the attached patch should fix this bug.

-- 
Anton Khirnov
Index: guvcview-1.7.1/src/avilib.c
===================================================================
--- guvcview-1.7.1.orig/src/avilib.c	2013-07-22 14:00:46.000000000 +0000
+++ guvcview-1.7.1/src/avilib.c	2014-02-28 22:30:54.791138191 +0000
@@ -962,7 +962,7 @@
             }
             else
             {
-                if (stream->codec_id == CODEC_ID_MP2 || stream->codec_id == CODEC_ID_MP3)
+                if (stream->codec_id == AV_CODEC_ID_MP2 || stream->codec_id == AV_CODEC_ID_MP3)
                         nb_frames += stream->packet_count;
             }
         }
Index: guvcview-1.7.1/src/callbacks.c
===================================================================
--- guvcview-1.7.1.orig/src/callbacks.c	2013-07-22 14:00:46.000000000 +0000
+++ guvcview-1.7.1/src/callbacks.c	2014-02-28 22:31:27.900950424 +0000
@@ -330,8 +330,8 @@
 			/** check for webm and change codecs acordingly */
 			if(global->VidFormat == WEBM_FORMAT)
 			{
-				int vcodec_ind = get_list_vcodec_index(CODEC_ID_VP8);
-				int acodec_ind = get_list_acodec_index(CODEC_ID_VORBIS);
+				int vcodec_ind = get_list_vcodec_index(AV_CODEC_ID_VP8);
+				int acodec_ind = get_list_acodec_index(AV_CODEC_ID_VORBIS);
 				if(vcodec_ind >= 0 && acodec_ind >= 0)
 				{
 					if(global->AudCodec != acodec_ind)
@@ -1517,7 +1517,7 @@
 	}
 
 	if( global->VidFormat == WEBM_FORMAT &&
-		get_acodec_id(global->AudCodec) != CODEC_ID_VORBIS)
+		get_acodec_id(global->AudCodec) != AV_CODEC_ID_VORBIS)
 	{
 		//change VidFormat to Matroska
 		fprintf(stderr, "WARN: webm can only use VORBIS audio codec \n");
@@ -1554,10 +1554,10 @@
 	}
 
 	if( global->VidFormat == WEBM_FORMAT &&
-		get_vcodec_id(global->VidCodec) != CODEC_ID_VP8)
+		get_vcodec_id(global->VidCodec) != AV_CODEC_ID_VP8)
 	{
 		//change VidFormat to Matroska
-		fprintf(stderr, "WARN: webm can only use VP8 video codec (0x%x != 0x%x)\n", global->VidCodec, CODEC_ID_VP8);
+		fprintf(stderr, "WARN: webm can only use VP8 video codec (0x%x != 0x%x)\n", global->VidCodec, AV_CODEC_ID_VP8);
 		fprintf(stderr, "      using matroska muxer instead\n");
 		global->VidFormat = MKV_FORMAT;
 		//FIXME: change file extension if needed
Index: guvcview-1.7.1/src/sound.c
===================================================================
--- guvcview-1.7.1.orig/src/sound.c	2013-07-22 14:00:46.000000000 +0000
+++ guvcview-1.7.1/src/sound.c	2014-02-28 22:31:51.704534388 +0000
@@ -276,7 +276,7 @@
 		fps_num = global->fps_num;
 		fps_den = global->fps;
 	}
-	if((get_vcodec_id(global->VidCodec) == CODEC_ID_H264) && (fps_den >= 5))
+	if((get_vcodec_id(global->VidCodec) == AV_CODEC_ID_H264) && (fps_den >= 5))
 		pdata->delay = (UINT64) 2*(fps_num * G_NSEC_PER_SEC / fps_den); /*2 frame delay in nanosec*/
 	pdata->delay += global->Sound_delay; /*add predefined delay - def = 0*/
 

Reply via email to