From 34955ac34d9be9eb2a21367e17d674033060973b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 5 Jul 2011 10:04:42 +0100 Subject: [PATCH] theoraenc: remove some unused code that caused a compiler warning The video format is set up in the sink pad's setcaps() function. --- ext/theora/gsttheoraenc.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index ed9c62e..29aa3f3 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -995,26 +995,10 @@ theora_enc_is_discontinuous (GstTheoraEnc * enc, GstClockTime timestamp, } static void -theora_enc_init_buffer (th_ycbcr_buffer buf, th_info * info, - GstVideoFrame * frame) +theora_enc_init_buffer (th_ycbcr_buffer buf, GstVideoFrame * frame) { - GstVideoFormat format; guint i; - switch (info->pixel_fmt) { - case TH_PF_444: - format = GST_VIDEO_FORMAT_Y444; - break; - case TH_PF_420: - format = GST_VIDEO_FORMAT_I420; - break; - case TH_PF_422: - format = GST_VIDEO_FORMAT_Y42B; - break; - default: - g_assert_not_reached (); - } - /* According to Theora developer Timothy Terriberry, the Theora * encoder will not use memory outside of pic_width/height, even when * the frame size is bigger. The values outside this region will be encoded @@ -1144,7 +1128,7 @@ theora_enc_encode_and_push (GstTheoraEnc * enc, ogg_packet op, GstVideoFrame frame; gst_video_frame_map (&frame, &enc->vinfo, buffer, GST_MAP_READ); - theora_enc_init_buffer (ycbcr, &enc->info, &frame); + theora_enc_init_buffer (ycbcr, &frame); if (theora_enc_is_discontinuous (enc, running_time, duration)) { theora_enc_reset (enc); -- 2.7.4