opusenc: use the same frame size setup as the opus test code
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 28 Sep 2011 12:25:21 +0000 (13:25 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 3 Oct 2011 09:21:02 +0000 (11:21 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=660364

ext/opus/gstopusenc.c

index 9d4fe12..10c1747 100644 (file)
@@ -286,12 +286,13 @@ gst_opus_enc_sink_setcaps (GstPad * pad, GstCaps * caps)
       enc->frame_samples = enc->sample_rate / 50;
       break;
     case 40:
-      enc->frame_samples = enc->sample_rate / 20;
+      enc->frame_samples = enc->sample_rate / 25;
       break;
     case 60:
       enc->frame_samples = 3 * enc->sample_rate / 50;
       break;
     default:
+      GST_WARNING_OBJECT (enc, "Unsupported frame size: %d", enc->frame_size);
       return FALSE;
       break;
   }