[FFmpeg-cvslog] add forgotten AV_ prefix to some CODEC_IDs

Paul B Mahol git at videolan.org
Sun Dec 9 02:50:35 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec  9 01:45:25 2012 +0000| [92f630eaf21c852fa29c3009b738737e94952bf2] | committer: Paul B Mahol

add forgotten AV_ prefix to some CODEC_IDs

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92f630eaf21c852fa29c3009b738737e94952bf2
---

 libavcodec/srtdec.c  |    2 +-
 libavcodec/srtenc.c  |    4 ++--
 libavformat/icoenc.c |   12 ++++++------
 libavformat/ircam.c  |   36 ++++++++++++++++++------------------
 libavformat/riff.c   |   10 +++++-----
 libavformat/vivo.c   |    4 ++--
 6 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index ddeabd2..cac4b39 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -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;
diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c
index 56f29e9..739645b 100644
--- a/libavcodec/srtenc.c
+++ b/libavcodec/srtenc.c
@@ -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;
diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c
index cbf8bd9..3e6a1ea 100644
--- a/libavformat/icoenc.c
+++ b/libavformat/icoenc.c
@@ -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,
diff --git a/libavformat/ircam.c b/libavformat/ircam.c
index 561cbb1..a267c18 100644
--- a/libavformat/ircam.c
+++ b/libavformat/ircam.c
@@ -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       },
 };
diff --git a/libavformat/riff.c b/libavformat/riff.c
index af48947..4328dde 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -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))) {
diff --git a/libavformat/vivo.c b/libavformat/vivo.c
index 7151d37..e0a1814 100644
--- a/libavformat/vivo.c
+++ b/libavformat/vivo.c
@@ -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;



More information about the ffmpeg-cvslog mailing list