Author: helmut-guest Date: 2014-05-27 20:01:24 +0000 (Tue, 27 May 2014) New Revision: 15114
Added: packages/trunk/jugglemaster/debian/patches/libav10.patch Modified: packages/trunk/jugglemaster/debian/changelog packages/trunk/jugglemaster/debian/patches/series Log: acknowledge NMU for #739244 Modified: packages/trunk/jugglemaster/debian/changelog =================================================================== --- packages/trunk/jugglemaster/debian/changelog 2014-05-25 13:21:51 UTC (rev 15113) +++ packages/trunk/jugglemaster/debian/changelog 2014-05-27 20:01:24 UTC (rev 15114) @@ -14,6 +14,14 @@ -- Helmut Grohne <[email protected]> Sat, 06 Jul 2013 16:23:00 +0200 +jugglemaster (0.4-6.3) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches/libav10.patch: Fix build with libav 10. Thanks to Anton + Khirnov for the patch. (Closes: #739244) + + -- Moritz Muehlenhoff <[email protected]> Sat, 15 Mar 2014 10:04:09 +0100 + jugglemaster (0.4-6.2) unstable; urgency=low * Non-maintainer upload. Added: packages/trunk/jugglemaster/debian/patches/libav10.patch =================================================================== --- packages/trunk/jugglemaster/debian/patches/libav10.patch (rev 0) +++ packages/trunk/jugglemaster/debian/patches/libav10.patch 2014-05-27 20:01:24 UTC (rev 15114) @@ -0,0 +1,88 @@ +Description: Support libav10 +Author: Anton Khirnov <[email protected]> +Bug-Debian: http://bugs.debian.org/739244 + +--- jugglemaster-0.4.orig/src/jmdlx/print.cpp ++++ jugglemaster-0.4/src/jmdlx/print.cpp +@@ -524,9 +524,10 @@ int Print::printMPEG() { + AVCodec *codec; + AVCodecContext *c= NULL; + AVFrame *picture; ++ int ret, got_output; + +- int i, out_size, size, outbuf_size; +- uint8_t *outbuf, *picture_buf; ++ int i, out_size, size; ++ uint8_t outbuf[4], *picture_buf; + + int x,y; + +@@ -546,7 +547,7 @@ int Print::printMPEG() { + + avcodec_register_all(); + +- codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); ++ codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO); + if (!codec) { + return(1); + } +@@ -568,8 +569,6 @@ int Print::printMPEG() { + return(1); + } + +- outbuf_size = 100000; +- outbuf = (uint8_t *)malloc(outbuf_size); + size = c->width * c->height; + picture_buf = (uint8_t *)malloc((size * 3) / 2); /* size for YUV 420 */ + +@@ -586,6 +585,9 @@ int Print::printMPEG() { + } + + while (!done) { ++ AVPacket pkt = { 0 }; ++ int ret, got_output; ++ + jmlib->doJuggle(); + + done = 1; +@@ -620,8 +622,11 @@ int Print::printMPEG() { + } + } + +- out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture); +- fwrite(outbuf, 1, out_size, outputfile); ++ ret = avcodec_encode_video2(c, &pkt, picture, &got_output); ++ if (ret >= 0 && got_output) { ++ fwrite(pkt.data, 1, pkt.size, outputfile); ++ av_free_packet(&pkt); ++ } + + if(current_frames % 10 == 0) { + if(FALSE == progress.Update(current_frames)) { +@@ -630,10 +635,14 @@ int Print::printMPEG() { + } + } + +- for(; out_size; i++) { +- out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL); +- fwrite(outbuf, 1, out_size, outputfile); +- } ++ do { ++ AVPacket pkt = { 0 }; ++ ret = avcodec_encode_video2(c, &pkt, NULL, &got_output); ++ if (ret >= 0 && got_output) { ++ fwrite(pkt.data, 1, pkt.size, outputfile); ++ av_free_packet(&pkt); ++ } ++ } while (got_output); + + outbuf[0] = 0x00; + outbuf[1] = 0x00; +@@ -641,7 +650,6 @@ int Print::printMPEG() { + outbuf[3] = 0xb7; + fwrite(outbuf, 1, 4, outputfile); + free(picture_buf); +- free(outbuf); + + avcodec_close(c); + free(c); Modified: packages/trunk/jugglemaster/debian/patches/series =================================================================== --- packages/trunk/jugglemaster/debian/patches/series 2014-05-25 13:21:51 UTC (rev 15113) +++ packages/trunk/jugglemaster/debian/patches/series 2014-05-27 20:01:24 UTC (rev 15114) @@ -11,3 +11,4 @@ ld-as-needed.patch libav9.patch loadavg.patch +libav10.patch _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

