AVCodecContext *avCodecCtx = s->avCodecCtx;
AVCodec *codec;
AVFrame *avFrame = s->avFrame;
+#if FF_API_LAVF_AVCTX
+ AVCodecParameters *codecpar;
+#endif
uint_t i;
sint_t selected_stream = -1;
int err;
s->selected_stream = selected_stream;
#if FF_API_LAVF_AVCTX
- AVCodecParameters *codecpar = avFormatCtx->streams[selected_stream]->codecpar;
+ codecpar = avFormatCtx->streams[selected_stream]->codecpar;
if (codecpar == NULL) {
AUBIO_ERR("source_avcodec: Could not find decoder for %s", s->path);
goto beach;
}
#else
avCodecCtx = avFormatCtx->streams[selected_stream]->codec;
- AVCodec *codec = avcodec_find_decoder(avCodecCtx->codec_id);
+ codec = avcodec_find_decoder(avCodecCtx->codec_id);
#endif
if (codec == NULL) {
AUBIO_ERR("source_avcodec: Could not find decoder for %s", s->path);