Package: avifile Version: 1:0.7.48~20090503.ds-12 Severity: important Tags: patch
hi, avifile currently FTBFS with libav that is currently in experimental. The attached patch should fix that. Please consider applying it to the package and discuss this with upstream. Cheers, Reinhard -- System Information: Debian Release: wheezy/sid APT prefers precise-updates APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 'precise-proposed'), (500, 'precise') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-32-generic (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
Index: avifile-0.7.48~20090503.ds/configure.in =================================================================== --- avifile-0.7.48~20090503.ds.orig/configure.in 2012-11-06 18:01:33.000000000 +0000 +++ avifile-0.7.48~20090503.ds/configure.in 2012-11-09 21:48:12.515760229 +0000 @@ -825,7 +825,7 @@ AM_PATH_FFMPEG tmp_LIBS="$LIBS" -AC_CHECK_LIB([avcodec], [avcodec_init], [], +AC_CHECK_LIB([avcodec], [avcodec_register_all], [], [AC_MSG_ERROR([libavcodec is required to build this package.])]) AC_CHECK_FUNCS([avcodec_decode_audio3 avcodec_decode_video2]) LIBS="$tmp_LIBS" Index: avifile-0.7.48~20090503.ds/lib/codeckeeper.cpp =================================================================== --- avifile-0.7.48~20090503.ds.orig/lib/codeckeeper.cpp 2009-04-24 23:42:12.000000000 +0000 +++ avifile-0.7.48~20090503.ds/lib/codeckeeper.cpp 2012-11-09 21:49:37.357421496 +0000 @@ -294,7 +294,6 @@ audio_codecs.clear(); // FFMPEG initialization - avcodec_init(); avcodec_register_all(); uncompressed_FillPlugins(video_codecs); Index: avifile-0.7.48~20090503.ds/lib/aviread/FFReadHandler.cpp =================================================================== --- avifile-0.7.48~20090503.ds.orig/lib/aviread/FFReadHandler.cpp 2012-11-09 21:54:08.689656695 +0000 +++ avifile-0.7.48~20090503.ds/lib/aviread/FFReadHandler.cpp 2012-11-09 22:02:30.107834443 +0000 @@ -68,21 +68,19 @@ int FFReadHandler::Init(const char* url) { - AVFormatParameters avfp; AVInputFormat* fmt = 0; // av_find_input_format(url); //printf("find input format %p %s\n", fmt, b); - memset(&avfp, 0, sizeof(avfp)); - int r = av_open_input_file(&m_pContext, url, - fmt, 64000, &avfp); + int r = avformat_open_input(&m_pContext, url, + fmt, NULL); if (r < 0) { AVM_WRITE("FF reader", "Open Input failed %d\n", r); return -1; } - if (av_find_stream_info(m_pContext) < 0) + if (avformat_find_stream_info(m_pContext, NULL) < 0) return -1; AVM_WRITE("FF reader", "Format:'%s' Stream(s):%d\n", m_pContext->iformat->long_name, m_pContext->nb_streams); @@ -202,7 +200,7 @@ if (av_read_frame(m_pContext, &pkt) < 0) { p->Release(); - if (url_ferror(m_pContext->pb)) + if (m_pContext->pb && m_pContext->pb->error) AVM_WRITE("FF reader", "error seen\n"); //if (!url_feof(m_pContext->pb)) Index: avifile-0.7.48~20090503.ds/plugins/libffmpeg/FFAudioDecoder.cpp =================================================================== --- avifile-0.7.48~20090503.ds.orig/plugins/libffmpeg/FFAudioDecoder.cpp 2012-11-06 18:01:33.000000000 +0000 +++ avifile-0.7.48~20090503.ds/plugins/libffmpeg/FFAudioDecoder.cpp 2012-11-09 22:07:56.570835067 +0000 @@ -25,7 +25,7 @@ { if (!m_pAvContext) { - if (!(m_pAvContext = avcodec_alloc_context2(m_pAvCodec->type))) + if (!(m_pAvContext = avcodec_alloc_context3(m_pAvCodec))) return -1; m_pAvContext->channels = m_pFormat->nChannels; @@ -46,7 +46,7 @@ m_pAvContext->extradata_size = m_pFormat->cbSize - skip; } - if (avcodec_open(m_pAvContext, m_pAvCodec) < 0) + if (avcodec_open2(m_pAvContext, m_pAvCodec, NULL) < 0) { AVM_WRITE("FFAudioDecoder", "WARNING: can't open avcodec\n"); free(m_pAvContext); Index: avifile-0.7.48~20090503.ds/plugins/libffmpeg/FFVideoDecoder.cpp =================================================================== --- avifile-0.7.48~20090503.ds.orig/plugins/libffmpeg/FFVideoDecoder.cpp 2012-11-06 18:01:33.000000000 +0000 +++ avifile-0.7.48~20090503.ds/plugins/libffmpeg/FFVideoDecoder.cpp 2012-11-09 22:34:15.311166461 +0000 @@ -117,7 +117,6 @@ pic->type = FF_BUFFER_TYPE_USER; pImage->m_iType = pic->pict_type; - pic->age = (pImage->GetAge() != pImage->MAX_AGE) ? pic->coded_picture_number - pImage->GetAge() : (1 << 30); if (pic->reference) pImage->Age(pic->coded_picture_number); else @@ -125,7 +124,7 @@ Debug printf("FF: <<<< GetBuffer %p %s %dx%d %p:%p:%p s:%f f:%d r:%d age:%d\n", pImage, ftypes[pic->pict_type], avctx->width, avctx->height, pImage->Data(0), pImage->Data(2), pImage->Data(1), - (double)pImage->m_lTimestamp / 1000000., avctx->pix_fmt, pic->reference, pic->age); + (double)pImage->m_lTimestamp / 1000000., avctx->pix_fmt, pic->reference); return 0; } @@ -162,7 +161,9 @@ //printf("FFMPEG space %p \n", m_pAvContext); m_Dest.Print(); pImage->GetFmt()->Print(); if (!m_pAvContext) { - if (!(m_pAvContext = avcodec_alloc_context2(m_pAvCodec->type))) + AVDictionary *dict = NULL; + + if (!(m_pAvContext = avcodec_alloc_context3(m_pAvCodec))) return -1; // for autodetection errors m_pAvContext->codec_tag = m_pFormat->biCompression; @@ -175,7 +176,7 @@ m_pAvContext->extradata_size = int(m_pFormat->biSize - sizeof(BITMAPINFOHEADER)); m_pAvContext->extradata = (uint8_t*)m_pFormat + sizeof(BITMAPINFOHEADER); if (m_pAvContext->extradata_size > 40) - m_pAvContext->flags |= CODEC_FLAG_EXTERN_HUFF; // somewhat useless + av_dict_set(&dict, "extern_huff", "1", 0); } m_uiBuffers = (pImage && pImage->GetAllocator()) ? pImage->GetAllocator()->GetImages() : 0; @@ -229,7 +230,7 @@ m_pAvContext->flags |= CODEC_FLAG_TRUNCATED; #endif -#if 1 +#if 0 m_pAvContext->error_recognition = FF_ER_COMPLIANT; m_pAvContext->error_concealment = FF_EC_GUESS_MVS; m_pAvContext->workaround_bugs = FF_BUG_AUTODETECT; @@ -281,12 +282,13 @@ m_pAvContext->workaround_bugs |= p->flag; } */ - if (avcodec_open(m_pAvContext, m_pAvCodec) < 0) + if (avcodec_open2(m_pAvContext, m_pAvCodec, &dict) < 0) { AVM_WRITE(m_Info.GetPrivateName(), "WARNING: FFVideoDecoder::DecodeFrame() can't open avcodec\n"); Stop(); return -1; } + av_dict_free(&dict); } // try using draw_horiz_band if DR1 is unsupported Index: avifile-0.7.48~20090503.ds/plugins/libffmpeg/Makefile.am =================================================================== --- avifile-0.7.48~20090503.ds.orig/plugins/libffmpeg/Makefile.am 2012-11-06 18:01:33.000000000 +0000 +++ avifile-0.7.48~20090503.ds/plugins/libffmpeg/Makefile.am 2012-11-09 22:36:37.327251649 +0000 @@ -13,7 +13,7 @@ libffmpeg.cpp FFMPEG_CFLAGS = -I$(top_srcdir)/ffmpeg -ffmpeg_la_LIBADD = ../../lib/libaviplay.la -lavcodec -lavformat +ffmpeg_la_LIBADD = ../../lib/libaviplay.la -lavcodec -lavformat -lavutil ffmpeg_la_LDFLAGS = -module -avoid-version AM_CPPFLAGS = $(LTNOPIC) $(INSTRUMENT) $(FFMPEG_CFLAGS)
_______________________________________________ pkg-multimedia-maintainers mailing list pkg-multimedia-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers