[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/server/asobj NetStreamFfmpeg.cpp [gnash_0_8_3_branc
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash/server/asobj NetStreamFfmpeg.cpp [gnash_0_8_3_branch] |
Date: |
Fri, 23 May 2008 11:27:09 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch: gnash_0_8_3_branch
Changes by: Bastiaan Jacques <bjacques> 08/05/23 11:27:09
Modified files:
server/asobj : NetStreamFfmpeg.cpp
Log message:
Revert unintentional commit
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&only_with_tag=gnash_0_8_3_branch&r1=1.116.2.6&r2=1.116.2.7
Patches:
Index: NetStreamFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v
retrieving revision 1.116.2.6
retrieving revision 1.116.2.7
diff -u -b -r1.116.2.6 -r1.116.2.7
--- NetStreamFfmpeg.cpp 23 May 2008 11:23:13 -0000 1.116.2.6
+++ NetStreamFfmpeg.cpp 23 May 2008 11:27:09 -0000 1.116.2.7
@@ -187,7 +187,10 @@
int
NetStreamFfmpeg::readPacket(void* opaque, boost::uint8_t* buf, int buf_size)
{
+
+
NetStreamFfmpeg* ns = static_cast<NetStreamFfmpeg*>(opaque);
+ boost::mutex::scoped_lock lock(ns->_netcon_mutex);
std::auto_ptr<tu_file>& nc = ns->_downloader;
size_t ret = nc->read_bytes(static_cast<void*>(buf), buf_size);
@@ -201,8 +204,10 @@
NetStreamFfmpeg::seekMedia(void *opaque, offset_t offset, int whence)
{
NetStreamFfmpeg* ns = static_cast<NetStreamFfmpeg*>(opaque);
+ boost::mutex::scoped_lock lock(ns->_netcon_mutex);
std::auto_ptr<tu_file>& nc = ns->_downloader;
+
// Offset is absolute new position in the file
if (whence == SEEK_SET)
{
@@ -724,14 +729,13 @@
// If queues are full then don't bother filling it
if ( ns->m_qvideo.size() < 20 || ns->m_qaudio.size() <
20 )
{
-#if 0
+
// If we have problems with decoding - break
if (!ns->decodeFLVFrame() &&
ns->decodingStatus() != DEC_BUFFERING && ns->m_qvideo.size() == 0 &&
ns->m_qaudio.size() == 0)
{
// TODO: do we really want to break
here !?
break;
}
-#endif
}
else
{
@@ -880,9 +884,6 @@
bool stereo = m_ACodecCtx->channels > 1 ? true : false;
int samples = stereo ? frame_size >> 2 : frame_size >> 1;
- if (samples <= 0) {
- return false;
- }
if (_resampler.init(m_ACodecCtx))
{
@@ -1154,11 +1155,8 @@
}
AVPacket packet;
- int rc;
- {
- boost::mutex::scoped_lock lock(_netcon_mutex);
- rc = av_read_frame(m_FormatCtx, &packet);
- }
+
+ int rc = av_read_frame(m_FormatCtx, &packet);
if (rc >= 0)
{
@@ -1216,7 +1214,6 @@
timebase = static_cast<double>(videostream->time_base.num /
videostream->time_base.den);
newpos = static_cast<long>(pos / timebase);
- boost::mutex::scoped_lock lock(_netcon_mutex);
if (av_seek_frame(m_FormatCtx, m_video_index, newpos, 0) < 0)
{
log_error(_("%s: seeking failed"), __FUNCTION__);
@@ -1256,7 +1253,6 @@
double newtime = 0;
while (newtime == 0)
{
- boost::mutex::scoped_lock lock(_netcon_mutex);
if (av_read_frame(m_FormatCtx, &Packet) < 0)
{
av_seek_frame(m_FormatCtx, -1, 0,
AVSEEK_FLAG_BACKWARD);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/server/asobj NetStreamFfmpeg.cpp [gnash_0_8_3_branch],
Bastiaan Jacques <=