Commit 5c26d333 authored by Jan Gerber's avatar Jan Gerber
Browse files

use AV_ prefixed codec ids

parent 91b8a09a
......@@ -211,37 +211,37 @@ void json_codec_info(FILE *output, AVCodecContext *enc, int indent) {
/* for PCM codecs, compute bitrate directly */
switch(enc->codec_id) {
case CODEC_ID_PCM_F64BE:
case CODEC_ID_PCM_F64LE:
case AV_CODEC_ID_PCM_F64BE:
case AV_CODEC_ID_PCM_F64LE:
bitrate = enc->sample_rate * enc->channels * 64;
break;
case CODEC_ID_PCM_S32LE:
case CODEC_ID_PCM_S32BE:
case CODEC_ID_PCM_U32LE:
case CODEC_ID_PCM_U32BE:
case CODEC_ID_PCM_F32BE:
case CODEC_ID_PCM_F32LE:
case AV_CODEC_ID_PCM_S32LE:
case AV_CODEC_ID_PCM_S32BE:
case AV_CODEC_ID_PCM_U32LE:
case AV_CODEC_ID_PCM_U32BE:
case AV_CODEC_ID_PCM_F32BE:
case AV_CODEC_ID_PCM_F32LE:
bitrate = enc->sample_rate * enc->channels * 32;
break;
case CODEC_ID_PCM_S24LE:
case CODEC_ID_PCM_S24BE:
case CODEC_ID_PCM_U24LE:
case CODEC_ID_PCM_U24BE:
case CODEC_ID_PCM_S24DAUD:
case AV_CODEC_ID_PCM_S24LE:
case AV_CODEC_ID_PCM_S24BE:
case AV_CODEC_ID_PCM_U24LE:
case AV_CODEC_ID_PCM_U24BE:
case AV_CODEC_ID_PCM_S24DAUD:
bitrate = enc->sample_rate * enc->channels * 24;
break;
case CODEC_ID_PCM_S16LE:
case CODEC_ID_PCM_S16BE:
case CODEC_ID_PCM_S16LE_PLANAR:
case CODEC_ID_PCM_U16LE:
case CODEC_ID_PCM_U16BE:
case AV_CODEC_ID_PCM_S16LE:
case AV_CODEC_ID_PCM_S16BE:
case AV_CODEC_ID_PCM_S16LE_PLANAR:
case AV_CODEC_ID_PCM_U16LE:
case AV_CODEC_ID_PCM_U16BE:
bitrate = enc->sample_rate * enc->channels * 16;
break;
case CODEC_ID_PCM_S8:
case CODEC_ID_PCM_U8:
case CODEC_ID_PCM_ALAW:
case CODEC_ID_PCM_MULAW:
case CODEC_ID_PCM_ZORK:
case AV_CODEC_ID_PCM_S8:
case AV_CODEC_ID_PCM_U8:
case AV_CODEC_ID_PCM_ALAW:
case AV_CODEC_ID_PCM_MULAW:
case AV_CODEC_ID_PCM_ZORK:
bitrate = enc->sample_rate * enc->channels * 8;
break;
default:
......
......@@ -356,14 +356,14 @@ static const char *find_category_for_subtitle_stream (ff2theora this, int idx, i
AVCodecContext *enc = this->context->streams[idx]->codec;
if (enc->codec_type != AVMEDIA_TYPE_SUBTITLE) return 0;
switch (enc->codec_id) {
case CODEC_ID_TEXT:
case CODEC_ID_SSA:
case CODEC_ID_MOV_TEXT:
case AV_CODEC_ID_TEXT:
case AV_CODEC_ID_SSA:
case AV_CODEC_ID_MOV_TEXT:
if (included_subtitles & INCSUB_TEXT)
return "SUB";
else
return NULL;
case CODEC_ID_DVD_SUBTITLE:
case AV_CODEC_ID_DVD_SUBTITLE:
if (included_subtitles & INCSUB_SPU)
return "K-SPU";
else
......@@ -1694,15 +1694,15 @@ void ff2theora_output(ff2theora this) {
}
}
}
else if (enc->codec_id == CODEC_ID_TEXT) {
else if (enc->codec_id == AV_CODEC_ID_TEXT) {
utf8 = (const char *)pkt.data;
utf8len = pkt.size;
}
else if (enc->codec_id == CODEC_ID_SSA) {
else if (enc->codec_id == AV_CODEC_ID_SSA) {
// SSA has control stuff in there, extract raw text
extra_info_from_ssa(&pkt,&utf8,&utf8len,&allocated_utf8,&duration);
}
else if (enc->codec_id == CODEC_ID_MOV_TEXT) {
else if (enc->codec_id == AV_CODEC_ID_MOV_TEXT) {
utf8 = (const char *)pkt.data;
utf8len = pkt.size;
if (utf8len >= 2) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment