mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
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.
This commit is contained in:
parent
a3d1cfe247
commit
11db4588a6
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue