diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-07 22:45:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-07 22:45:46 +0200 |
commit | 7a72695c05f12f21a62dc99fa64d1726fc11b236 (patch) | |
tree | e8f1a2813c4cd1fd8bd0ac5f764c7fd676ab85af /libavformat/flvdec.c | |
parent | 49440853d0c1e740daee0e2df1e65d5e67b1ad6b (diff) | |
parent | 36ef5369ee9b336febc2c270f8718cec4476cb85 (diff) | |
download | ffmpeg-7a72695c05f12f21a62dc99fa64d1726fc11b236.tar.gz |
Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
Replace all CODEC_ID_* with AV_CODEC_ID_*
lavc: add AV prefix to codec ids.
Conflicts:
doc/APIchanges
doc/examples/decoding_encoding.c
doc/examples/muxing.c
ffmpeg.c
ffprobe.c
ffserver.c
libavcodec/8svx.c
libavcodec/avcodec.h
libavcodec/dnxhd_parser.c
libavcodec/dvdsubdec.c
libavcodec/error_resilience.c
libavcodec/h263dec.c
libavcodec/libvorbisenc.c
libavcodec/mjpeg_parser.c
libavcodec/mjpegenc.c
libavcodec/mpeg12.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/pcm.c
libavcodec/r210dec.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/version.h
libavdevice/alsa-audio-dec.c
libavdevice/bktr.c
libavdevice/v4l2.c
libavformat/asfdec.c
libavformat/asfenc.c
libavformat/avformat.h
libavformat/avidec.c
libavformat/caf.c
libavformat/electronicarts.c
libavformat/flacdec.c
libavformat/flvdec.c
libavformat/flvenc.c
libavformat/framecrcenc.c
libavformat/img2.c
libavformat/img2dec.c
libavformat/img2enc.c
libavformat/ipmovie.c
libavformat/isom.c
libavformat/matroska.c
libavformat/matroskadec.c
libavformat/matroskaenc.c
libavformat/mov.c
libavformat/movenc.c
libavformat/mp3dec.c
libavformat/mpeg.c
libavformat/mpegts.c
libavformat/mxf.c
libavformat/mxfdec.c
libavformat/mxfenc.c
libavformat/nsvdec.c
libavformat/nut.c
libavformat/oggenc.c
libavformat/pmpdec.c
libavformat/rawdec.c
libavformat/rawenc.c
libavformat/riff.c
libavformat/sdp.c
libavformat/utils.c
libavformat/vocenc.c
libavformat/wtv.c
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 2c342bbddb..bf1ff98fde 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -95,34 +95,34 @@ static int flv_same_audio_codec(AVCodecContext *acodec, int flags) switch(flv_codecid) { //no distinction between S16 and S8 PCM codec flags case FLV_CODECID_PCM: - codec_id = bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : + codec_id = bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : #if HAVE_BIGENDIAN - CODEC_ID_PCM_S16BE; + AV_CODEC_ID_PCM_S16BE; #else - CODEC_ID_PCM_S16LE; + AV_CODEC_ID_PCM_S16LE; #endif return codec_id == acodec->codec_id; case FLV_CODECID_PCM_LE: - codec_id = bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : CODEC_ID_PCM_S16LE; + codec_id = bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : AV_CODEC_ID_PCM_S16LE; return codec_id == acodec->codec_id; case FLV_CODECID_AAC: - return acodec->codec_id == CODEC_ID_AAC; + return acodec->codec_id == AV_CODEC_ID_AAC; case FLV_CODECID_ADPCM: - return acodec->codec_id == CODEC_ID_ADPCM_SWF; + return acodec->codec_id == AV_CODEC_ID_ADPCM_SWF; case FLV_CODECID_SPEEX: - return acodec->codec_id == CODEC_ID_SPEEX; + return acodec->codec_id == AV_CODEC_ID_SPEEX; case FLV_CODECID_MP3: - return acodec->codec_id == CODEC_ID_MP3; + return acodec->codec_id == AV_CODEC_ID_MP3; case FLV_CODECID_NELLYMOSER_8KHZ_MONO: case FLV_CODECID_NELLYMOSER_16KHZ_MONO: case FLV_CODECID_NELLYMOSER: - return acodec->codec_id == CODEC_ID_NELLYMOSER; + return acodec->codec_id == AV_CODEC_ID_NELLYMOSER; case FLV_CODECID_PCM_MULAW: return acodec->sample_rate == 8000 && - acodec->codec_id == CODEC_ID_PCM_MULAW; + acodec->codec_id == AV_CODEC_ID_PCM_MULAW; case FLV_CODECID_PCM_ALAW: return acodec->sample_rate = 8000 && - acodec->codec_id == CODEC_ID_PCM_ALAW; + acodec->codec_id == AV_CODEC_ID_PCM_ALAW; default: return acodec->codec_tag == (flv_codecid >> FLV_AUDIO_CODECID_OFFSET); } @@ -134,40 +134,40 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, AVCodecCo switch(flv_codecid) { //no distinction between S16 and S8 PCM codec flags case FLV_CODECID_PCM: - acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : + acodec->codec_id = acodec->bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : #if HAVE_BIGENDIAN - CODEC_ID_PCM_S16BE; + AV_CODEC_ID_PCM_S16BE; #else - CODEC_ID_PCM_S16LE; + AV_CODEC_ID_PCM_S16LE; #endif break; case FLV_CODECID_PCM_LE: - acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : CODEC_ID_PCM_S16LE; break; - case FLV_CODECID_AAC : acodec->codec_id = CODEC_ID_AAC; break; - case FLV_CODECID_ADPCM: acodec->codec_id = CODEC_ID_ADPCM_SWF; break; + acodec->codec_id = acodec->bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : AV_CODEC_ID_PCM_S16LE; break; + case FLV_CODECID_AAC : acodec->codec_id = AV_CODEC_ID_AAC; break; + case FLV_CODECID_ADPCM: acodec->codec_id = AV_CODEC_ID_ADPCM_SWF; break; case FLV_CODECID_SPEEX: - acodec->codec_id = CODEC_ID_SPEEX; + acodec->codec_id = AV_CODEC_ID_SPEEX; acodec->sample_rate = 16000; break; - case FLV_CODECID_MP3 : acodec->codec_id = CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break; + case FLV_CODECID_MP3 : acodec->codec_id = AV_CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break; case FLV_CODECID_NELLYMOSER_8KHZ_MONO: acodec->sample_rate = 8000; //in case metadata does not otherwise declare samplerate - acodec->codec_id = CODEC_ID_NELLYMOSER; + acodec->codec_id = AV_CODEC_ID_NELLYMOSER; break; case FLV_CODECID_NELLYMOSER_16KHZ_MONO: acodec->sample_rate = 16000; - acodec->codec_id = CODEC_ID_NELLYMOSER; + acodec->codec_id = AV_CODEC_ID_NELLYMOSER; break; case FLV_CODECID_NELLYMOSER: - acodec->codec_id = CODEC_ID_NELLYMOSER; + acodec->codec_id = AV_CODEC_ID_NELLYMOSER; break; case FLV_CODECID_PCM_MULAW: acodec->sample_rate = 8000; - acodec->codec_id = CODEC_ID_PCM_MULAW; + acodec->codec_id = AV_CODEC_ID_PCM_MULAW; break; case FLV_CODECID_PCM_ALAW: acodec->sample_rate = 8000; - acodec->codec_id = CODEC_ID_PCM_ALAW; + acodec->codec_id = AV_CODEC_ID_PCM_ALAW; break; default: av_log(s, AV_LOG_INFO, "Unsupported audio codec (%x)\n", flv_codecid >> FLV_AUDIO_CODECID_OFFSET); @@ -184,17 +184,17 @@ static int flv_same_video_codec(AVCodecContext *vcodec, int flags) switch (flv_codecid) { case FLV_CODECID_H263: - return vcodec->codec_id == CODEC_ID_FLV1; + return vcodec->codec_id == AV_CODEC_ID_FLV1; case FLV_CODECID_SCREEN: - return vcodec->codec_id == CODEC_ID_FLASHSV; + return vcodec->codec_id == AV_CODEC_ID_FLASHSV; case FLV_CODECID_SCREEN2: - return vcodec->codec_id == CODEC_ID_FLASHSV2; + return vcodec->codec_id == AV_CODEC_ID_FLASHSV2; case FLV_CODECID_VP6: - return vcodec->codec_id == CODEC_ID_VP6F; + return vcodec->codec_id == AV_CODEC_ID_VP6F; case FLV_CODECID_VP6A: - return vcodec->codec_id == CODEC_ID_VP6A; + return vcodec->codec_id == AV_CODEC_ID_VP6A; case FLV_CODECID_H264: - return vcodec->codec_id == CODEC_ID_H264; + return vcodec->codec_id == AV_CODEC_ID_H264; default: return vcodec->codec_tag == flv_codecid; } @@ -205,14 +205,14 @@ static int flv_same_video_codec(AVCodecContext *vcodec, int flags) static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) { AVCodecContext *vcodec = vstream->codec; switch(flv_codecid) { - case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break; - case FLV_CODECID_REALH263: vcodec->codec_id = CODEC_ID_H263 ; break; // Really mean it this time - case FLV_CODECID_SCREEN: vcodec->codec_id = CODEC_ID_FLASHSV; break; - case FLV_CODECID_SCREEN2: vcodec->codec_id = CODEC_ID_FLASHSV2; break; - case FLV_CODECID_VP6 : vcodec->codec_id = CODEC_ID_VP6F ; + case FLV_CODECID_H263 : vcodec->codec_id = AV_CODEC_ID_FLV1 ; break; + case FLV_CODECID_REALH263: vcodec->codec_id = AV_CODEC_ID_H263 ; break; // Really mean it this time + case FLV_CODECID_SCREEN: vcodec->codec_id = AV_CODEC_ID_FLASHSV; break; + case FLV_CODECID_SCREEN2: vcodec->codec_id = AV_CODEC_ID_FLASHSV2; break; + case FLV_CODECID_VP6 : vcodec->codec_id = AV_CODEC_ID_VP6F ; case FLV_CODECID_VP6A : if(flv_codecid == FLV_CODECID_VP6A) - vcodec->codec_id = CODEC_ID_VP6A; + vcodec->codec_id = AV_CODEC_ID_VP6A; if(vcodec->extradata_size != 1) { vcodec->extradata_size = 1; vcodec->extradata = av_malloc(1 + FF_INPUT_BUFFER_PADDING_SIZE); @@ -220,10 +220,10 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_co vcodec->extradata[0] = avio_r8(s->pb); return 1; // 1 byte body size adjustment for flv_read_packet() case FLV_CODECID_H264: - vcodec->codec_id = CODEC_ID_H264; + vcodec->codec_id = AV_CODEC_ID_H264; return 3; // not 4, reading packet type will consume one byte case FLV_CODECID_MPEG4: - vcodec->codec_id = CODEC_ID_MPEG4; + vcodec->codec_id = AV_CODEC_ID_MPEG4; return 3; default: av_log(s, AV_LOG_INFO, "Unsupported video codec (%x)\n", flv_codecid); @@ -406,7 +406,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst AVStream *st = create_stream(s, AVMEDIA_TYPE_DATA); if (!st) return AVERROR(ENOMEM); - st->codec->codec_id = CODEC_ID_TEXT; + st->codec->codec_id = AV_CODEC_ID_TEXT; } else if (flv->trust_metadata) { if (!strcmp(key, "videocodecid") && vcodec) { flv_set_video_codec(s, vstream, num_val); @@ -621,7 +621,7 @@ static int flv_data_packet(AVFormatContext *s, AVPacket *pkt, st = create_stream(s, AVMEDIA_TYPE_DATA); if (!st) goto out; - st->codec->codec_id = CODEC_ID_TEXT; + st->codec->codec_id = AV_CODEC_ID_TEXT; } pkt->dts = dts; @@ -792,12 +792,12 @@ retry_duration: size -= flv_set_video_codec(s, st, flags & FLV_VIDEO_CODECID_MASK); } - if (st->codec->codec_id == CODEC_ID_AAC || - st->codec->codec_id == CODEC_ID_H264 || - st->codec->codec_id == CODEC_ID_MPEG4) { + if (st->codec->codec_id == AV_CODEC_ID_AAC || + st->codec->codec_id == AV_CODEC_ID_H264 || + st->codec->codec_id == AV_CODEC_ID_MPEG4) { int type = avio_r8(s->pb); size--; - if (st->codec->codec_id == CODEC_ID_H264 || st->codec->codec_id == CODEC_ID_MPEG4) { + if (st->codec->codec_id == AV_CODEC_ID_H264 || st->codec->codec_id == AV_CODEC_ID_MPEG4) { int32_t cts = (avio_rb24(s->pb)+0xff800000)^0xff800000; // sign extension pts = dts + cts; if (cts < 0) { // dts are wrong @@ -807,7 +807,7 @@ retry_duration: if (flv->wrong_dts) dts = AV_NOPTS_VALUE; } - if (type == 0 && (!st->codec->extradata || st->codec->codec_id == CODEC_ID_AAC)) { + if (type == 0 && (!st->codec->extradata || st->codec->codec_id == AV_CODEC_ID_AAC)) { if (st->codec->extradata) { if ((ret = flv_queue_extradata(flv, s->pb, stream_type, size)) < 0) return ret; @@ -816,7 +816,7 @@ retry_duration: } if ((ret = flv_get_extradata(s, st, size)) < 0) return ret; - if (st->codec->codec_id == CODEC_ID_AAC) { + if (st->codec->codec_id == AV_CODEC_ID_AAC) { MPEG4AudioConfig cfg; if (avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata, st->codec->extradata_size * 8, 1) >= 0) { |