Mercurial > mplayer.hg
diff libmpcodecs/ad_ffmpeg.c @ 32768:3544ba7244bf
Change deprecated PKT_FLAG_KEY, CODEC_TYPE_* and SAMPLE_FMT_* to their
new names.
| author | reimar |
|---|---|
| date | Sat, 05 Feb 2011 14:02:49 +0000 |
| parents | 414aaa8b9357 |
| children | b623edea8e3c |
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c Sat Feb 05 13:58:36 2011 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Sat Feb 05 14:02:49 2011 +0000 @@ -59,10 +59,10 @@ int samplerate = lavc_context->sample_rate; int sample_format = sh_audio->sample_format; switch (lavc_context->sample_fmt) { - case SAMPLE_FMT_U8: sample_format = AF_FORMAT_U8; break; - case SAMPLE_FMT_S16: sample_format = AF_FORMAT_S16_NE; break; - case SAMPLE_FMT_S32: sample_format = AF_FORMAT_S32_NE; break; - case SAMPLE_FMT_FLT: sample_format = AF_FORMAT_FLOAT_NE; break; + case AV_SAMPLE_FMT_U8: sample_format = AF_FORMAT_U8; break; + case AV_SAMPLE_FMT_S16: sample_format = AF_FORMAT_S16_NE; break; + case AV_SAMPLE_FMT_S32: sample_format = AF_FORMAT_S32_NE; break; + case AV_SAMPLE_FMT_FLT: sample_format = AF_FORMAT_FLOAT_NE; break; default: mp_msg(MSGT_DECAUDIO, MSGL_FATAL, "Unsupported sample format\n"); } @@ -122,7 +122,7 @@ } lavc_context->request_channels = audio_output_channels; lavc_context->codec_tag = sh_audio->format; //FOURCC - lavc_context->codec_type = CODEC_TYPE_AUDIO; + lavc_context->codec_type = AVMEDIA_TYPE_AUDIO; lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi /* alloc extra data */ @@ -172,10 +172,10 @@ sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; switch (lavc_context->sample_fmt) { - case SAMPLE_FMT_U8: - case SAMPLE_FMT_S16: - case SAMPLE_FMT_S32: - case SAMPLE_FMT_FLT: + case AV_SAMPLE_FMT_U8: + case AV_SAMPLE_FMT_S16: + case AV_SAMPLE_FMT_S32: + case AV_SAMPLE_FMT_FLT: break; default: return 0;
