mov: Support muxing/demuxing iLBC

The packet size, signalled via block_align, has to be passed via
the container.

Signed-off-by: Martin Storsjö <martin@martin.st>
pull/59/head
Martin Storsjö 13 years ago
parent 3641b0489c
commit 9e74db6850
  1. 1
      libavformat/isom.c
  2. 1
      libavformat/mov.c
  3. 3
      libavformat/movenc.c

@ -244,6 +244,7 @@ const AVCodecTag ff_codec_movaudio_tags[] = {
{ CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') },
{ CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') },
{ CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') },
{ CODEC_ID_ILBC, MKTAG('i', 'l', 'b', 'c') },
{ CODEC_ID_MACE3, MKTAG('M', 'A', 'C', '3') },
{ CODEC_ID_MACE6, MKTAG('M', 'A', 'C', '6') },
{ CODEC_ID_MP1, MKTAG('.', 'm', 'p', '1') },

@ -1456,6 +1456,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
case CODEC_ID_GSM:
case CODEC_ID_ADPCM_MS:
case CODEC_ID_ADPCM_IMA_WAV:
case CODEC_ID_ILBC:
st->codec->block_align = sc->bytes_per_frame;
break;
case CODEC_ID_ALAC:

@ -3095,7 +3095,8 @@ static int mov_write_header(AVFormatContext *s)
}else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO){
track->timescale = st->codec->sample_rate;
/* set sample_size for PCM and ADPCM */
if (av_get_bits_per_sample(st->codec->codec_id)) {
if (av_get_bits_per_sample(st->codec->codec_id) ||
st->codec->codec_id == CODEC_ID_ILBC) {
if (!st->codec->block_align) {
av_log(s, AV_LOG_ERROR, "track %d: codec block align is not set\n", i);
goto error;

Loading…
Cancel
Save