public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in media-sound/gejengel/files: gejengel-0.1.4-ffmpeg-1.patch
@ 2013-01-24 13:42 Alexis Ballier (aballier)
  0 siblings, 0 replies; only message in thread
From: Alexis Ballier (aballier) @ 2013-01-24 13:42 UTC (permalink / raw
  To: gentoo-commits

aballier    13/01/24 13:42:37

  Added:                gejengel-0.1.4-ffmpeg-1.patch
  Log:
  Fix build with ffmpeg-1, part of bug #443220
  
  (Portage version: 2.2.0_alpha159/cvs/Linux x86_64, signed Manifest commit with key 160F534A)

Revision  Changes    Path
1.1                  media-sound/gejengel/files/gejengel-0.1.4-ffmpeg-1.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/gejengel/files/gejengel-0.1.4-ffmpeg-1.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/gejengel/files/gejengel-0.1.4-ffmpeg-1.patch?rev=1.1&content-type=text/plain

Index: gejengel-0.1.4-ffmpeg-1.patch
===================================================================
Index: gejengel-0.1.4/src/AudioDecoder/ffmpegdecoder.cpp
===================================================================
--- gejengel-0.1.4.orig/src/AudioDecoder/ffmpegdecoder.cpp
+++ gejengel-0.1.4/src/AudioDecoder/ffmpegdecoder.cpp
@@ -83,7 +83,7 @@ void FFmpegDecoder::initialise()
     avcodec_register_all();
     av_register_all();
 
-    if (av_open_input_file(&m_pFormatContext, m_Filepath.c_str(), NULL, 0, NULL) != 0)
+    if (avformat_open_input(&m_pFormatContext, m_Filepath.c_str(), NULL, NULL) != 0)
     {
         throw logic_error("Could not open input file: " + m_Filepath);
     }
@@ -307,21 +307,7 @@ AudioFormat FFmpegDecoder::getAudioForma
 {
     AudioFormat format;
 
-    switch(m_pAudioCodecContext->sample_fmt)
-    {
-    case SAMPLE_FMT_U8:
-        format.bits = 8;
-        break;
-    case SAMPLE_FMT_S16:
-        format.bits = 16;
-        break;
-    case SAMPLE_FMT_S32:
-        format.bits = 32;
-        break;
-    default:
-        format.bits = 0;
-    }
-
+    format.bits             = av_get_bytes_per_sample(m_pAudioCodecContext->sample_fmt) << 3;
     format.rate             = m_pAudioCodecContext->sample_rate;
     format.numChannels      = m_pAudioCodecContext->channels;
     format.framesPerPacket  = m_pAudioCodecContext->frame_size;





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-24 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24 13:42 [gentoo-commits] gentoo-x86 commit in media-sound/gejengel/files: gejengel-0.1.4-ffmpeg-1.patch Alexis Ballier (aballier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox