decoder/ffmpeg: don't use deprecated CODEC_TYPE_AUDIO with new lavc

fixes build with lavc 53.
This commit is contained in:
Anton Khirnov 2011-05-02 20:53:15 +02:00 committed by Max Kellermann
parent 05d8ce3bcd
commit 327d41c00f
2 changed files with 6 additions and 0 deletions

2
NEWS
View File

@ -1,5 +1,7 @@
ver 0.16.3 (2011/??/??)
* fix assertion failure in audio format mask parser
* decoder:
- ffmpeg: support lavc 53
ver 0.16.2 (2011/03/18)

View File

@ -160,7 +160,11 @@ ffmpeg_find_audio_stream(const AVFormatContext *format_context)
{
for (unsigned i = 0; i < format_context->nb_streams; ++i)
if (format_context->streams[i]->codec->codec_type ==
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
AVMEDIA_TYPE_AUDIO)
#else
CODEC_TYPE_AUDIO)
#endif
return i;
return -1;