libav 0.7.2 has no avcodec_open2.

This commit is contained in:
Johns 2011-12-19 23:34:47 +01:00
parent 36b285b5f7
commit 8a98257515

View File

@ -267,7 +267,7 @@ void CodecVideoOpen(VideoDecoder * decoder, const char *name, int codec_id)
Fatal(_("codec: can't allocate video codec context\n")); Fatal(_("codec: can't allocate video codec context\n"));
} }
// open codec // open codec
#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52,122,0) #if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(53,5,0)
if (avcodec_open(decoder->VideoCtx, video_codec) < 0) { if (avcodec_open(decoder->VideoCtx, video_codec) < 0) {
Fatal(_("codec: can't open video codec!\n")); Fatal(_("codec: can't open video codec!\n"));
} }
@ -523,7 +523,7 @@ void CodecAudioOpen(AudioDecoder * audio_decoder, const char *name,
Fatal(_("codec: can't allocate audio codec context\n")); Fatal(_("codec: can't allocate audio codec context\n"));
} }
// open codec // open codec
#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52,122,0) #if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(53,5,0)
if (avcodec_open(audio_decoder->AudioCtx, audio_codec) < 0) { if (avcodec_open(audio_decoder->AudioCtx, audio_codec) < 0) {
Fatal(_("codec: can't open audio codec\n")); Fatal(_("codec: can't open audio codec\n"));
} }