diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-04-17 16:25:12 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-04-17 16:27:09 +0200 |
commit | 11db4588a673fe8ae2aeb38dafa1d025c0774e46 (patch) | |
tree | 8076e0a484c3f8a25c3da30e4c76c5dc415cda54 /ext/ffmpeg/gstffmpegcodecmap.c | |
parent | a3d1cfe2474a49ae5cb1cc7d3273528e6aa58a3c (diff) |
ffmpeg: add default frame_size for g726
Without a frame_size configured in the context, the ffmpeg encoders do nothing.
Since the G726 does not configure a size itself, we set ourselves a frame_size
that corresponds to 20ms of audio, which is a reasonable default.
Diffstat (limited to 'ext/ffmpeg/gstffmpegcodecmap.c')
-rw-r--r-- | ext/ffmpeg/gstffmpegcodecmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index 269d503..88d96ec 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -1236,6 +1236,9 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; case CODEC_ID_ADPCM_G726: layout = "g726"; + if (context) + /* get a default 20ms packet size */ + context->frame_size = context->sample_rate / 50; break; case CODEC_ID_ADPCM_CT: layout = "ct"; @@ -2264,6 +2267,8 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id, break; } } + case CODEC_ID_ADPCM_G726: + break; default: break; } |