[SCM] GNU Shockwave Flash (SWF) player branch, master, updated. debian/0.8.11_git20140121+dfsg-1-3-gfcf0a3c

Gabriele Giacone gg0-guest at moszumanska.debian.org
Thu Mar 27 16:16:06 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Shockwave Flash (SWF) player".

The branch, master has been updated
       via  fcf0a3cadf53bd6b0092ae2264f4e6f6e7b1b97c (commit)
       via  6375964fd4be204aa909e809c77bb22b021f1851 (commit)
       via  fd2350bc8a42d224c26c5e7d2d58537263a3e037 (commit)
      from  d3d688c6553a8f5827ae416694b764b97913a7f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                       |  7 +++++++
 libcore/movie_root.cpp                 |  6 +++++-
 libmedia/ffmpeg/AudioDecoderFfmpeg.cpp | 34 +++++++++++++++++-----------------
 libmedia/ffmpeg/MediaParserFfmpeg.cpp  |  2 +-
 libmedia/ffmpeg/VideoDecoderFfmpeg.cpp | 22 +++++++++++-----------
 libmedia/ffmpeg/ffmpegHeaders.h        | 22 ++++++++++++++++++++++
 revno.h                                |  2 +-
 testsuite/analyse-results.sh           |  2 +-
 8 files changed, 65 insertions(+), 32 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7c51275..d798f96 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gnash (0.8.11~git20140319+dfsg-1) unstable; urgency=medium
+
+  * New upstream snapshot.
+    + Support libav10 (Closes: #739303).
+
+ -- Gabriele Giacone <1o5g4r8o at gmail.com>  Wed, 19 Mar 2014 12:53:19 +0100
+
 gnash (0.8.11~git20140121+dfsg-1) unstable; urgency=medium
 
   * Git snapshot.
diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 1bae796..3ec506c 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -1626,7 +1626,11 @@ movie_root::processInvoke(ExternalInterface::invoke_t *invoke)
         MovieClip *mc = getLevel(0);
         int loaded = mc->get_bytes_loaded();
         int total = mc->get_bytes_total();
-        as_value val((loaded/total) * 100);
+        int percent = 0;
+        if (total > 0) { /* avoid division by zero */
+          percent = 100 * loaded / total;
+        }
+        as_value val(percent);
         // PercentLoaded sends the percentage
         ss << ExternalInterface::toXML(val);    
     } else if (invoke->name == "Play") {
diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index 653e8a2..ce51e88 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -89,17 +89,17 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
 
     switch(info.getFormat()) {
         case AUDIO_CODEC_RAW:
-            codec_id = CODEC_ID_PCM_U16LE;
+            codec_id = AV_CODEC_ID_PCM_U16LE;
             break;
         case AUDIO_CODEC_ADPCM:
-            codec_id = CODEC_ID_ADPCM_SWF;
+            codec_id = AV_CODEC_ID_ADPCM_SWF;
             break;
         case AUDIO_CODEC_MP3:
-            codec_id = CODEC_ID_MP3;
+            codec_id = AV_CODEC_ID_MP3;
             _needsParsing=true;
             break;
         case AUDIO_CODEC_AAC:
-            codec_id = CODEC_ID_AAC;
+            codec_id = AV_CODEC_ID_AAC;
             _needsParsing=true;
             break;
         default:
@@ -157,10 +157,10 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
     /// @todo do this only if !_needsParsing ?
     switch (_audioCodecCtx->codec->id)
     {
-            case CODEC_ID_MP3:
+            case AV_CODEC_ID_MP3:
                 break;
 
-            case CODEC_ID_PCM_U16LE:
+            case AV_CODEC_ID_PCM_U16LE:
                 _audioCodecCtx->channels = (info.isStereo() ? 2 : 1);
                 _audioCodecCtx->sample_rate = info.getSampleRate();
                 _audioCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16; // ?! arbitrary ?
@@ -184,7 +184,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
 #endif
     avcodec_register_all();// change this to only register need codec?
 
-    enum CODECID codec_id = CODEC_ID_NONE;
+    enum CODECID codec_id = AV_CODEC_ID_NONE;
 
     if (info.type == CODEC_TYPE_CUSTOM)
     {
@@ -198,22 +198,22 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
             case AUDIO_CODEC_UNCOMPRESSED:
             case AUDIO_CODEC_RAW:
                 if (info.sampleSize == 2) {
-                    codec_id = CODEC_ID_PCM_S16LE;
+                    codec_id = AV_CODEC_ID_PCM_S16LE;
                 } else {
-                    codec_id = CODEC_ID_PCM_S8;
+                    codec_id = AV_CODEC_ID_PCM_S8;
                 }
                 break;
 
             case AUDIO_CODEC_ADPCM:
-                codec_id = CODEC_ID_ADPCM_SWF;
+                codec_id = AV_CODEC_ID_ADPCM_SWF;
                 break;
 
             case AUDIO_CODEC_MP3:
-                codec_id = CODEC_ID_MP3;
+                codec_id = AV_CODEC_ID_MP3;
                 break;
 
             case AUDIO_CODEC_AAC:
-                codec_id = CODEC_ID_AAC;
+                codec_id = AV_CODEC_ID_AAC;
                 break;
 
 #ifdef FFMPEG_NELLYMOSER
@@ -221,7 +221,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
             //       (but probably not Ffmpeg's fault, he said)
             //       I'd like to take a look at the testcase --strk
             case AUDIO_CODEC_NELLYMOSER:
-                codec_id = CODEC_ID_NELLYMOSER;
+                codec_id = AV_CODEC_ID_NELLYMOSER;
                 break;
 #endif
 
@@ -292,15 +292,15 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
     //       some of the variables
     switch (codec_id)
     {
-            case CODEC_ID_MP3:
+            case AV_CODEC_ID_MP3:
                 break;
 
-            case CODEC_ID_PCM_S8:
+            case AV_CODEC_ID_PCM_S8:
                 // Either FFMPEG or the parser are getting this wrong.
                 _audioCodecCtx->sample_rate = info.sampleRate / 2;
                 _audioCodecCtx->channels = (info.stereo ? 2 : 1);
                 break;
-            case CODEC_ID_PCM_S16LE:
+            case AV_CODEC_ID_PCM_S16LE:
                 _audioCodecCtx->channels = (info.stereo ? 2 : 1);
                 _audioCodecCtx->sample_rate = info.sampleRate;
                 break;
@@ -500,7 +500,7 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
     av_init_packet(&pkt);
     pkt.data = const_cast<uint8_t*>(input);
     pkt.size = inputSize;
-    ScopedPtr<AVFrame> frm ( avcodec_alloc_frame(), av_free );
+    ScopedPtr<AVFrame> frm ( FRAMEALLOC(), av_free );
     if (!frm.get()) {
         log_error(_("failed to allocate frame."));
         return NULL;
diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
index f7cdf2e..a90eef9 100644
--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
@@ -492,7 +492,7 @@ MediaParserFfmpeg::initializeParser()
         boost::uint16_t width = _videoStream->codec->width;
         boost::uint16_t height = _videoStream->codec->height;
         boost::uint16_t frameRate = static_cast<boost::uint16_t>(
-                as_double(_videoStream->r_frame_rate));
+                as_double(_videoStream->avg_frame_rate));
 #if !defined(HAVE_LIBAVFORMAT_AVFORMAT_H) && !defined(HAVE_FFMPEG_AVCODEC_H)
         boost::uint64_t duration = _videoStream->codec_info_duration;
 #else
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
index 5c850b8..1150dbb 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
@@ -131,7 +131,7 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(const VideoInfo& info)
     _videoCodec(NULL)
 {
 
-    CODECID codec_id = CODEC_ID_NONE;
+    CODECID codec_id = AV_CODEC_ID_NONE;
 
     if ( info.type == CODEC_TYPE_FLASH )
     {
@@ -140,7 +140,7 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(const VideoInfo& info)
     else codec_id = static_cast<CODECID>(info.codec);
 
     // This would cause nasty segfaults.
-    if (codec_id == CODEC_ID_NONE)
+    if (codec_id == AV_CODEC_ID_NONE)
     {
         boost::format msg = boost::format(_("Cannot find suitable "
                 "decoder for flash codec %d")) % info.codec;
@@ -266,7 +266,7 @@ VideoDecoderFfmpeg::frameToImage(AVCodecContext* srcCtx,
     const int height = srcCtx->height;
 
 #ifdef FFMPEG_VP6A
-    PixelFormat pixFmt = (srcCtx->codec->id == CODEC_ID_VP6A) ?
+    PixelFormat pixFmt = (srcCtx->codec->id == AV_CODEC_ID_VP6A) ?
         PIX_FMT_RGBA : PIX_FMT_RGB24;
 #else 
     PixelFormat pixFmt = PIX_FMT_RGB24;
@@ -368,7 +368,7 @@ VideoDecoderFfmpeg::decode(const boost::uint8_t* input,
 
     std::auto_ptr<image::GnashImage> ret;
 
-    AVFrame* frame = avcodec_alloc_frame();
+    AVFrame* frame = FRAMEALLOC();
     if ( ! frame ) {
         log_error(_("Out of memory while allocating avcodec frame"));
         return ret;
@@ -436,23 +436,23 @@ VideoDecoderFfmpeg::flashToFfmpegCodec(videoCodecType format)
         // Find the decoder and init the parser
         switch(format) {
                 case VIDEO_CODEC_H264:
-                         return CODEC_ID_H264;
+                         return AV_CODEC_ID_H264;
                 case VIDEO_CODEC_H263:
-			 // CODEC_ID_H263I didn't work with Lavc51.50.0
+			 // AV_CODEC_ID_H263I didn't work with Lavc51.50.0
 			 // and NetStream-SquareTest.swf
-                         return CODEC_ID_FLV1;
+                         return AV_CODEC_ID_FLV1;
                 case VIDEO_CODEC_VP6:
-                        return CODEC_ID_VP6F;
+                        return AV_CODEC_ID_VP6F;
 #ifdef FFMPEG_VP6A
                 case VIDEO_CODEC_VP6A:
-	                return CODEC_ID_VP6A;
+	                return AV_CODEC_ID_VP6A;
 #endif
                 case VIDEO_CODEC_SCREENVIDEO:
-                        return CODEC_ID_FLASHSV;
+                        return AV_CODEC_ID_FLASHSV;
                 default:
                         log_error(_("Unsupported video codec %d"),
                                 static_cast<int>(format));
-                        return CODEC_ID_NONE;
+                        return AV_CODEC_ID_NONE;
         }
 }
 
diff --git a/libmedia/ffmpeg/ffmpegHeaders.h b/libmedia/ffmpeg/ffmpegHeaders.h
index 5cd3785..0741777 100644
--- a/libmedia/ffmpeg/ffmpegHeaders.h
+++ b/libmedia/ffmpeg/ffmpegHeaders.h
@@ -96,6 +96,28 @@ extern "C" {
 #define AVSampleFormat SampleFormat
 #endif
 
+// till Debian libav 10~beta1
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,34,1)
+#define AV_CODEC_ID_AAC CODEC_ID_AAC
+#define AV_CODEC_ID_ADPCM_SWF CODEC_ID_ADPCM_SWF
+#define AV_CODEC_ID_FLASHSV CODEC_ID_FLASHSV
+#define AV_CODEC_ID_FLV1 CODEC_ID_FLV1
+#define AV_CODEC_ID_H264 CODEC_ID_H264
+#define AV_CODEC_ID_MP3 CODEC_ID_MP3
+#define AV_CODEC_ID_NELLYMOSER CODEC_ID_NELLYMOSER
+#define AV_CODEC_ID_NONE CODEC_ID_NONE
+#define AV_CODEC_ID_PCM_S8 CODEC_ID_PCM_S8
+#define AV_CODEC_ID_PCM_S16LE CODEC_ID_PCM_S16LE
+#define AV_CODEC_ID_PCM_U16LE CODEC_ID_PCM_U16LE
+#define AV_CODEC_ID_VP6A CODEC_ID_VP6A
+#define AV_CODEC_ID_VP6F CODEC_ID_VP6F
+
+#define avg_frame_rate r_frame_rate
+#define FRAMEALLOC avcodec_alloc_frame
+#else
+#define FRAMEALLOC av_frame_alloc
+#endif
+
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,18,102)
 #define CODECID AVCodecID
 #else
diff --git a/revno.h b/revno.h
index 8685d81..309c972 100644
--- a/revno.h
+++ b/revno.h
@@ -1,3 +1,3 @@
 #define BRANCH_REVNO "2"
 #define BRANCH_NICK "master"
-#define COMMIT_ID "8a8759c"
+#define COMMIT_ID "a3180f2"
diff --git a/testsuite/analyse-results.sh b/testsuite/analyse-results.sh
index 10f1010..fcba838 100755
--- a/testsuite/analyse-results.sh
+++ b/testsuite/analyse-results.sh
@@ -98,7 +98,7 @@ echo
 # For now, return a failure if any XPASS or FAIL occurred
 if test ${total_fail} -gt 0 || test ${total_xpass} -gt 0; then
 
-	timing=testsuite/timingissues
+	timing=$(dirname $0)/timingissues
 	> ${timing}.tmp
 
 	if test ${total_fail} -gt 0; then


hooks/post-receive
-- 
GNU Shockwave Flash (SWF) player



More information about the pkg-flash-devel mailing list