Commit 5207cf14 authored by Eric Petit's avatar Eric Petit

* fixed the audio input (grrr, GetAudioFrame() is virtual)

parent 3689eed1
......@@ -2,7 +2,7 @@
* raw2ts.cpp: raw -> ES ffmpeg encoder -> TS
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: raw2ts.cpp,v 1.8 2003/02/20 19:38:59 titer Exp $
* $Id: raw2ts.cpp,v 1.9 2003/02/21 00:18:56 titer Exp $
*
* Authors: Tristan Leteurtre <tooney@videolan.org>
* (inspirated from Fabrice Bellard...)
......@@ -228,7 +228,7 @@ void C_Raw2TsMpegConverter::DoWork()
memset(&m_Frame,0, sizeof(AVFrame));
TmpBuf = new u8 [m_iPictureBufSize];
// Stream the file
while(!m_bStop && !iRc)
{
......@@ -295,7 +295,7 @@ void C_Raw2TsMpegConverter::DoWork()
m_pReader->GetAudioFrame(&m_AudioSampleBuf, m_iAudioSampleBufSize);
outSize = avcodec_encode_audio( m_AudioCodecContext, m_AudioOutBuf,
m_iAudioSampleBufSize, (short*)m_AudioSampleBuf );
m_iAudioSampleBufSize, (short*)m_AudioSampleBuf );
PesPacket->BuildPacket(TimeStamp, 0xC0, m_AudioOutBuf, outSize );
......
......@@ -2,7 +2,7 @@
* v4lreader.cpp: Reading from a v4l device (WebCam, tv tuner)
*-------------------------------------------------------------------------------
* (c)1999-2002 VideoLAN
* $Id: v4lreader.cpp,v 1.6 2003/02/20 05:57:23 titer Exp $
* $Id: v4lreader.cpp,v 1.7 2003/02/21 00:18:56 titer Exp $
*
* Authors: Tristan Leteurtre <tooney@videolan.org>
*
......@@ -435,7 +435,8 @@ int C_v4lMpegReader::GetFrame(byte ** ppBuff , int iSize)
int C_v4lMpegReader::GetAudioFrame(byte ** ppBuff, int iSize)
{
return( read( m_iAudioFD, *ppBuff, iSize ) );
int iRead = read( m_iAudioFD, *ppBuff, iSize );
return( iRead );
}
//------------------------------------------------------------------------------
......
......@@ -2,7 +2,7 @@
* reader.h: Stream readers
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: reader.h,v 1.4 2003/02/20 05:57:23 titer Exp $
* $Id: reader.h,v 1.5 2003/02/21 00:18:56 titer Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -60,7 +60,8 @@ public:
virtual int Seek(s64 iOffset, int bStartPos) = 0;
virtual int GetFrame(byte ** pBuff ,int iSize) = 0;
int GetAudioFrame(byte ** pBuff ,int iSize) { return 0; } /* for V4L only */
virtual int GetAudioFrame(byte ** pBuff ,int iSize) { return 0; }
/* for V4L only */
virtual s64 Size() = 0;
virtual s64 GetPos() = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment