Control: tags -1 + patch

On 2014-02-17 00:21:44, Moritz Muehlenhoff wrote:
> Package: dff
> Severity: important
> 
> Hi,
> your package fails to build from source against libav 10 (currently
> packaged in experimental). This bug will become release-critical
> at some point when the libav10 transition starts.
> 
> Migration documentation can be found at
> https://wiki.libav.org/Migration/10
> 
> Cheers,
>         Moritz
> 
> [ 88%] Building CXX object dff/api/gui/video/CMakeFiles/video.dir/video.cpp.o
> cd /home/jmm/av10/dff-1.3.0+dfsg.1/build-2.7/dff/api/gui/video && 
> /usr/bin/c++   -DHAVE_TRE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 
> -D__STDC_LIMIT_MACROS -Dvideo_EXPORTS -g -O2 -fstack-protector 
> --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -fPIC 
> -I/home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/../include 
> -I/usr/include/python2.7 -I/home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video 
> -I/home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/include    -O2 -fPIC -o 
> CMakeFiles/video.dir/video.cpp.o -c 
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp: In constructor 
> 'VideoDecoder::VideoDecoder(Node*)':
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:134:18: warning: 
> 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at 
> /usr/include/libavcodec/avcodec.h:3110) [-Wdeprecated-declarations]
>    this->_frame = avcodec_alloc_frame();
>                   ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:134:38: warning: 
> 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at 
> /usr/include/libavcodec/avcodec.h:3110) [-Wdeprecated-declarations]
>    this->_frame = avcodec_alloc_frame();
>                                       ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp: In member 
> function 'void VideoDecoder::_clear()':
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:163:45: error: 
> 'av_close_input_file' was not declared in this scope
>      av_close_input_file(this->_formatContext);
>                                              ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp: In member 
> function 'void VideoDecoder::_createAVFrame(AVFrame**, uint8_t**, int, int, 
> AVPixelFormat)':
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:284:17: warning: 
> 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at 
> /usr/include/libavcodec/avcodec.h:3110) [-Wdeprecated-declarations]
>      *pAvFrame = avcodec_alloc_frame();
>                  ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:284:37: warning: 
> 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at 
> /usr/include/libavcodec/avcodec.h:3110) [-Wdeprecated-declarations]
>      *pAvFrame = avcodec_alloc_frame();
>                                      ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp: In member 
> function 'bool VideoDecoder::_decodeVideoPacket()':
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:346:4: warning: 
> 'void avcodec_get_frame_defaults(AVFrame*)' is deprecated (declared at 
> /usr/include/libavcodec/avcodec.h:3120) [-Wdeprecated-declarations]
>     avcodec_get_frame_defaults(this->_frame);
>     ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:346:43: warning: 
> 'void avcodec_get_frame_defaults(AVFrame*)' is deprecated (declared at 
> /usr/include/libavcodec/avcodec.h:3120) [-Wdeprecated-declarations]
>     avcodec_get_frame_defaults(this->_frame);
>                                            ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp: In member 
> function 'RCPtr<Image> VideoDecoder::_thumbnail(int32_t)':
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:435:5: warning: 
> 'int avpicture_deinterlace(AVPicture*, const AVPicture*, AVPixelFormat, int, 
> int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3986) 
> [-Wdeprecated-declarations]
>      avpicture_deinterlace((AVPicture*) this->_frame, (AVPicture*) 
> this->_frame, this->_codecContext->pix_fmt,
>      ^
> /home/jmm/av10/dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp:436:61: warning: 
> 'int avpicture_deinterlace(AVPicture*, const AVPicture*, AVPixelFormat, int, 
> int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3986) 
> [-Wdeprecated-declarations]
>       this->_codecContext->width, this->_codecContext->height);

The attached patch should be enough to make it build against libav 10.
It also works against libav 9.

Regards
-- 
Sebastian Ramacher
--- dff-1.3.0+dfsg.1.orig/dff/api/gui/video/video.cpp
+++ dff-1.3.0+dfsg.1/dff/api/gui/video/video.cpp
@@ -160,7 +160,7 @@ void	VideoDecoder::_clear(void)
   }
   if (this->_formatContext)
   {
-    av_close_input_file(this->_formatContext);
+    avformat_close_input(&this->_formatContext);
     this->_formatContext = NULL;
   }
   if (this->_codec) //return by avcodec_find_decoder not allocated ?

Attachment: signature.asc
Description: Digital signature

Reply via email to