1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

add forgotten AV_ prefix to some CODEC_IDs

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-12-09 01:45:25 +00:00
parent 7f01247572
commit 92f630eaf2
6 changed files with 34 additions and 34 deletions

View File

@ -234,7 +234,7 @@ static int srt_decode_frame(AVCodecContext *avctx,
return avpkt->size;
while (ptr < end && *ptr) {
if (avctx->codec->id == CODEC_ID_SRT) {
if (avctx->codec->id == AV_CODEC_ID_SRT) {
ptr = read_ts(ptr, &ts_start, &ts_end, &x1, &y1, &x2, &y2);
if (!ptr)
break;

View File

@ -204,7 +204,7 @@ static void srt_move_cb(void *priv, int x1, int y1, int x2, int y2,
{
SRTContext *s = priv;
if (s->avctx->codec->id == CODEC_ID_SRT) {
if (s->avctx->codec->id == AV_CODEC_ID_SRT) {
char buffer[32];
int len = snprintf(buffer, sizeof(buffer),
" X1:%03u X2:%03u Y1:%03u Y2:%03u", x1, x2, y1, y2);
@ -254,7 +254,7 @@ static int srt_encode_frame(AVCodecContext *avctx,
dialog = ff_ass_split_dialog(s->ass_ctx, sub->rects[i]->ass, 0, &num);
for (; dialog && num--; dialog++) {
if (avctx->codec->id == CODEC_ID_SRT) {
if (avctx->codec->id == AV_CODEC_ID_SRT) {
int sh, sm, ss, sc = 10 * dialog->start;
int eh, em, es, ec = 10 * dialog->end;
sh = sc/3600000; sc -= 3600000*sh;

View File

@ -44,7 +44,7 @@ typedef struct {
static int ico_check_attributes(AVFormatContext *s, const AVCodecContext *c)
{
if (c->codec_id == CODEC_ID_BMP) {
if (c->codec_id == AV_CODEC_ID_BMP) {
if (c->pix_fmt == AV_PIX_FMT_PAL8 && AV_PIX_FMT_RGB32 != AV_PIX_FMT_BGRA) {
av_log(s, AV_LOG_ERROR, "Wrong endianness for bmp pixel format\n");
return AVERROR(EINVAL);
@ -55,7 +55,7 @@ static int ico_check_attributes(AVFormatContext *s, const AVCodecContext *c)
av_log(s, AV_LOG_ERROR, "BMP must be 1bit, 4bit, 8bit, 16bit, 24bit, or 32bit\n");
return AVERROR(EINVAL);
}
} else if (c->codec_id == CODEC_ID_PNG) {
} else if (c->codec_id == AV_CODEC_ID_PNG) {
if (c->pix_fmt != AV_PIX_FMT_RGBA) {
av_log(s, AV_LOG_ERROR, "PNG in ico requires pixel format to be rgba\n");
return AVERROR(EINVAL);
@ -129,7 +129,7 @@ static int ico_write_packet(AVFormatContext *s, AVPacket *pkt)
image->width = (c->width == 256) ? 0 : c->width;
image->height = (c->height == 256) ? 0 : c->height;
if (c->codec_id == CODEC_ID_PNG) {
if (c->codec_id == AV_CODEC_ID_PNG) {
image->bits = c->bits_per_coded_sample;
image->size = pkt->size;
@ -170,7 +170,7 @@ static int ico_write_trailer(AVFormatContext *s)
avio_w8(pb, ico->images[i].width);
avio_w8(pb, ico->images[i].height);
if (s->streams[i]->codec->codec_id == CODEC_ID_BMP &&
if (s->streams[i]->codec->codec_id == AV_CODEC_ID_BMP &&
s->streams[i]->codec->pix_fmt == AV_PIX_FMT_PAL8) {
avio_w8(pb, (ico->images[i].bits >= 8) ? 0 : 1 << ico->images[i].bits);
} else {
@ -195,8 +195,8 @@ AVOutputFormat ff_ico_muxer = {
.priv_data_size = sizeof(IcoMuxContext),
.mime_type = "image/vnd.microsoft.icon",
.extensions = "ico",
.audio_codec = CODEC_ID_NONE,
.video_codec = CODEC_ID_BMP,
.audio_codec = AV_CODEC_ID_NONE,
.video_codec = AV_CODEC_ID_BMP,
.write_header = ico_write_header,
.write_packet = ico_write_packet,
.write_trailer = ico_write_trailer,

View File

@ -23,25 +23,25 @@
#include "internal.h"
const AVCodecTag ff_codec_ircam_le_tags[] = {
{ CODEC_ID_PCM_ALAW, 0x10001 },
{ CODEC_ID_PCM_F32LE, 0x00004 },
{ CODEC_ID_PCM_F64LE, 0x00008 },
{ CODEC_ID_PCM_MULAW, 0x20001 },
{ CODEC_ID_PCM_S16LE, 0x00002 },
{ CODEC_ID_PCM_S24LE, 0x00003 },
{ CODEC_ID_PCM_S32LE, 0x40004 },
{ CODEC_ID_PCM_S8, 0x00001 },
{ CODEC_ID_NONE, 0 },
{ AV_CODEC_ID_PCM_ALAW, 0x10001 },
{ AV_CODEC_ID_PCM_F32LE, 0x00004 },
{ AV_CODEC_ID_PCM_F64LE, 0x00008 },
{ AV_CODEC_ID_PCM_MULAW, 0x20001 },
{ AV_CODEC_ID_PCM_S16LE, 0x00002 },
{ AV_CODEC_ID_PCM_S24LE, 0x00003 },
{ AV_CODEC_ID_PCM_S32LE, 0x40004 },
{ AV_CODEC_ID_PCM_S8, 0x00001 },
{ AV_CODEC_ID_NONE, 0 },
};
const AVCodecTag ff_codec_ircam_be_tags[] = {
{ CODEC_ID_PCM_ALAW, 0x10001 },
{ CODEC_ID_PCM_F32BE, 0x00004 },
{ CODEC_ID_PCM_F64BE, 0x00008 },
{ CODEC_ID_PCM_MULAW, 0x20001 },
{ CODEC_ID_PCM_S16BE, 0x00002 },
{ CODEC_ID_PCM_S24BE, 0x00003 },
{ CODEC_ID_PCM_S32BE, 0x40004 },
{ CODEC_ID_PCM_S8, 0x00001 },
{ CODEC_ID_NONE, 0 },
{ AV_CODEC_ID_PCM_ALAW, 0x10001 },
{ AV_CODEC_ID_PCM_F32BE, 0x00004 },
{ AV_CODEC_ID_PCM_F64BE, 0x00008 },
{ AV_CODEC_ID_PCM_MULAW, 0x20001 },
{ AV_CODEC_ID_PCM_S16BE, 0x00002 },
{ AV_CODEC_ID_PCM_S24BE, 0x00003 },
{ AV_CODEC_ID_PCM_S32BE, 0x40004 },
{ AV_CODEC_ID_PCM_S8, 0x00001 },
{ AV_CODEC_ID_NONE, 0 },
};

View File

@ -462,11 +462,11 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
}
avio_wl16(pb, enc->channels);
avio_wl32(pb, enc->sample_rate);
if (enc->codec_id == CODEC_ID_ATRAC3 ||
enc->codec_id == CODEC_ID_G723_1 ||
enc->codec_id == CODEC_ID_GSM_MS ||
enc->codec_id == CODEC_ID_MP2 ||
enc->codec_id == CODEC_ID_MP3) {
if (enc->codec_id == AV_CODEC_ID_ATRAC3 ||
enc->codec_id == AV_CODEC_ID_G723_1 ||
enc->codec_id == AV_CODEC_ID_GSM_MS ||
enc->codec_id == AV_CODEC_ID_MP2 ||
enc->codec_id == AV_CODEC_ID_MP3) {
bps = 0;
} else {
if (!(bps = av_get_bits_per_sample(enc->codec_id))) {

View File

@ -226,8 +226,8 @@ static int vivo_read_header(AVFormatContext *s)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
if (vivo->version == 1) {
vst->codec->codec_id = CODEC_ID_H263;
ast->codec->codec_id = CODEC_ID_G723_1;
vst->codec->codec_id = AV_CODEC_ID_H263;
ast->codec->codec_id = AV_CODEC_ID_G723_1;
ast->codec->bits_per_coded_sample = 8;
ast->codec->block_align = 24;
ast->codec->bit_rate = 6400;