Bug#803835: libextractor: diff for NMU version 1:1.3-3.1
Hi Sebastian, Le 25/04/2016 22:54, Sebastian Ramacher a écrit : > Hi Bertrand > > On 2016-04-25 22:40:47, Bertrand Marc wrote: >> Hello, >> >> Thank you for your work. I also prepared a new version, with a patch >> taken from upstream (attached). I should be able to prepare the package >> tomorrow, but I will only upload it to mentors since I don't have >> uploading rights. >> >> Please consider sponsoring my forthcoming upload. > > Feel free to send me a link to the dsc once the package is ready. I prepared a new revision of libextrator and uploaded it to mentors [1]. Could you please have a look ? Thanks, Bertrand [1] http://mentors.debian.net/debian/pool/main/libe/libextractor/libextractor_1.3-4.dsc signature.asc Description: OpenPGP digital signature
Bug#803835: libextractor: diff for NMU version 1:1.3-3.1
Hi Bertrand On 2016-04-25 22:40:47, Bertrand Marc wrote: > Hello, > > Thank you for your work. I also prepared a new version, with a patch > taken from upstream (attached). I should be able to prepare the package > tomorrow, but I will only upload it to mentors since I don't have > uploading rights. > > Please consider sponsoring my forthcoming upload. Feel free to send me a link to the dsc once the package is ready. Cheers -- Sebastian Ramacher signature.asc Description: PGP signature
Bug#803835: libextractor: diff for NMU version 1:1.3-3.1
Hello, Thank you for your work. I also prepared a new version, with a patch taken from upstream (attached). I should be able to prepare the package tomorrow, but I will only upload it to mentors since I don't have uploading rights. Please consider sponsoring my forthcoming upload. Regards, Bertrand Le 25/04/2016 19:40, Sebastian Ramacher a écrit : > Control: tags 803835 + pending > > Dear maintainer, > > I've prepared an NMU for libextractor (versioned as 1:1.3-3.1) and > uploaded it to DELAYED/2. Please feel free to tell me if I > should delay it longer. > > Regards. > Description: update to new API in FFmpeg 2.9, fix FTBS Origin: upstream Applied-Upstream: commit: r35548:r35549 and r36975 --- a/src/plugins/thumbnailffmpeg_extractor.c +++ b/src/plugins/thumbnailffmpeg_extractor.c @@ -59,6 +59,20 @@ #include #endif +#if USE_JPEG +#ifdef PIX_FMT_YUVJ420P +#define PIX_OUTPUT_FORMAT PIX_FMT_YUVJ420P +#else +#define PIX_OUTPUT_FORMAT AV_PIX_FMT_YUVJ420P +#endif +#else +#ifdef PIX_FMT_RGB24 +#define PIX_OUTPUT_FORMAT PIX_FMT_RGB24 +#else +#define PIX_OUTPUT_FORMAT AV_PIX_FMT_RGB24 +#endif +#endif + /** * Set to 1 to enable debug output. */ @@ -153,7 +167,7 @@ static size_t create_thumbnail (int src_width, int src_height, int src_stride[], - enum PixelFormat src_pixfmt, + enum AVPixelFormat src_pixfmt, const uint8_t * const src_data[], int dst_width, int dst_height, uint8_t **output_data, @@ -189,7 +203,8 @@ if (NULL == (scaler_ctx = sws_getContext (src_width, src_height, src_pixfmt, - dst_width, dst_height, PIX_FMT_RGB24, + dst_width, dst_height, + PIX_OUTPUT_FORMAT, SWS_BILINEAR, NULL, NULL, NULL))) { #if DEBUG @@ -199,7 +214,12 @@ return 0; } - if (NULL == (dst_frame = avcodec_alloc_frame ())) +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) + dst_frame = av_frame_alloc (); +#else + dst_frame = avcodec_alloc_frame(); +#endif + if (NULL == dst_frame) { #if DEBUG fprintf (stderr, @@ -209,18 +229,24 @@ return 0; } if (NULL == (dst_buffer = - av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height + av_malloc (avpicture_get_size (PIX_OUTPUT_FORMAT, + dst_width, dst_height { #if DEBUG fprintf (stderr, "Failed to allocate the destination image buffer\n"); #endif - av_free (dst_frame); +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) + av_frame_free (_frame); +#else + avcodec_free_frame (_frame); +#endif sws_freeContext (scaler_ctx); return 0; } avpicture_fill ((AVPicture *) dst_frame, dst_buffer, - PIX_FMT_RGB24, dst_width, dst_height); + PIX_OUTPUT_FORMAT, + dst_width, dst_height); sws_scale (scaler_ctx, src_data, src_stride, @@ -236,7 +262,11 @@ "Failed to allocate the encoder output buffer\n"); #endif av_free (dst_buffer); - av_free (dst_frame); +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) + av_frame_free (_frame); +#else + avcodec_free_frame (_frame); +#endif sws_freeContext (scaler_ctx); return 0; } @@ -249,13 +279,17 @@ #endif av_free (encoder_output_buffer); av_free (dst_buffer); - av_free (dst_frame); +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) + av_frame_free (_frame); +#else + avcodec_free_frame (_frame); +#endif sws_freeContext (scaler_ctx); return 0; } encoder_codec_ctx->width = dst_width; encoder_codec_ctx->height = dst_height; - encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24; + encoder_codec_ctx->pix_fmt = PIX_OUTPUT_FORMAT; opts = NULL; if (avcodec_open2 (encoder_codec_ctx, encoder_codec, ) < 0) { @@ -263,10 +297,14 @@ fprintf (stderr, "Failed to open the encoder\n"); #endif - av_free (encoder_codec_ctx); + avcodec_free_context (_codec_ctx); av_free (encoder_output_buffer); av_free (dst_buffer); - av_free (dst_frame); +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) + av_frame_free (_frame); +#else + avcodec_free_frame (_frame); +#endif sws_freeContext (scaler_ctx); return 0; } @@ -295,9 +333,13 @@ cleanup: av_dict_free (); avcodec_close (encoder_codec_ctx); - av_free (encoder_codec_ctx); + avcodec_free_context (_codec_ctx); av_free (dst_buffer); - av_free (dst_frame); +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) + av_frame_free (_frame); +#else + avcodec_free_frame (_frame); +#endif sws_freeContext (scaler_ctx); *output_data = encoder_output_buffer; @@ -406,18 +448,23 @@ fprintf (stderr, "Failed to open image codec\n"); #endif - av_free (codec_ctx); + avcodec_free_context (_ctx); return; } av_dict_free
Bug#803835: libextractor: diff for NMU version 1:1.3-3.1
Control: tags 803835 + pending Dear maintainer, I've prepared an NMU for libextractor (versioned as 1:1.3-3.1) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Regards. -- Sebastian Ramacher diff -Nru libextractor-1.3/debian/changelog libextractor-1.3/debian/changelog --- libextractor-1.3/debian/changelog 2015-11-15 17:13:37.0 +0100 +++ libextractor-1.3/debian/changelog 2016-04-25 19:36:15.0 +0200 @@ -1,3 +1,12 @@ +libextractor (1:1.3-3.1) unstable; urgency=medium + + * Non-maintainer upload. + + [ Andreas Cadhalpun ] + * Fix build against ffmpeg 3.0. (Closes: #803835) + + -- Sebastian RamacherMon, 25 Apr 2016 19:36:14 +0200 + libextractor (1:1.3-3) unstable; urgency=medium * Update long description to list the supported formats. diff -Nru libextractor-1.3/debian/patches/ffmpeg_2.9_pixfmt.patch libextractor-1.3/debian/patches/ffmpeg_2.9_pixfmt.patch --- libextractor-1.3/debian/patches/ffmpeg_2.9_pixfmt.patch 1970-01-01 01:00:00.0 +0100 +++ libextractor-1.3/debian/patches/ffmpeg_2.9_pixfmt.patch 2016-04-25 19:35:47.0 +0200 @@ -0,0 +1,51 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun +Last-Update: <2015-11-28> + +--- libextractor-1.3.orig/src/plugins/thumbnailffmpeg_extractor.c libextractor-1.3/src/plugins/thumbnailffmpeg_extractor.c +@@ -153,7 +153,7 @@ seek_cb (void *opaque, + static size_t + create_thumbnail (int src_width, int src_height, + int src_stride[], +- enum PixelFormat src_pixfmt, ++ enum AVPixelFormat src_pixfmt, + const uint8_t * const src_data[], + int dst_width, int dst_height, + uint8_t **output_data, +@@ -189,7 +189,7 @@ create_thumbnail (int src_width, int src + if (NULL == + (scaler_ctx = +sws_getContext (src_width, src_height, src_pixfmt, +- dst_width, dst_height, PIX_FMT_RGB24, ++ dst_width, dst_height, AV_PIX_FMT_RGB24, + SWS_BILINEAR, NULL, NULL, NULL))) + { + #if DEBUG +@@ -214,7 +214,7 @@ create_thumbnail (int src_width, int src + return 0; + } + if (NULL == (dst_buffer = +- av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height ++ av_malloc (avpicture_get_size (AV_PIX_FMT_RGB24, dst_width, dst_height + { + #if DEBUG + fprintf (stderr, +@@ -229,7 +229,7 @@ create_thumbnail (int src_width, int src + return 0; + } + avpicture_fill ((AVPicture *) dst_frame, dst_buffer, +- PIX_FMT_RGB24, dst_width, dst_height); ++ AV_PIX_FMT_RGB24, dst_width, dst_height); + sws_scale (scaler_ctx, + src_data, + src_stride, +@@ -272,7 +272,7 @@ create_thumbnail (int src_width, int src + } + encoder_codec_ctx->width = dst_width; + encoder_codec_ctx->height = dst_height; +- encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24; ++ encoder_codec_ctx->pix_fmt = AV_PIX_FMT_RGB24; + opts = NULL; + if (avcodec_open2 (encoder_codec_ctx, encoder_codec, ) < 0) + { diff -Nru libextractor-1.3/debian/patches/series libextractor-1.3/debian/patches/series --- libextractor-1.3/debian/patches/series 2015-11-15 14:53:19.0 +0100 +++ libextractor-1.3/debian/patches/series 2016-04-25 19:35:47.0 +0200 @@ -1,2 +1,3 @@ libgiflib5.1.patch ffmpeg2.9.patch +ffmpeg_2.9_pixfmt.patch signature.asc Description: PGP signature