From 1b68dac7fb05d3b529fa127ad4eb738dd9f0a36b Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 22 Nov 2010 17:41:15 +0100 Subject: [PATCH] Do not log an error for missing Video info in DefineVideo, as that's fine when Vide is being created by ActionScript or intentionally w/out data just to use with NetStream --- libcore/Video.cpp | 10 +++++----- libcore/Video.h | 8 ++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/libcore/Video.cpp b/libcore/Video.cpp index 711826967..9ec56bf1d 100644 --- a/libcore/Video.cpp +++ b/libcore/Video.cpp @@ -75,10 +75,7 @@ Video::Video(as_object* object, } media::VideoInfo* info = m_def->getVideoInfo(); - if (!info) { - log_error(_("No Video info in video definition")); - return; - } + if (!info) return; try { _decoder = mh->createVideoDecoder(*info); @@ -156,7 +153,10 @@ Video::getVideoFrame() // Don't try to do anything if there is no decoder. If it was // never constructed (most likely), we'll return nothing, // otherwise the last decoded frame. - if (!_decoder.get()) return _lastDecodedVideoFrame.get(); + if (!_decoder.get()) { + LOG_ONCE( log_error(_("No Video info in video definition")) ); + return _lastDecodedVideoFrame.get(); + } int current_frame = get_ratio(); diff --git a/libcore/Video.h b/libcore/Video.h index 35e177e35..7b1c97ae2 100644 --- a/libcore/Video.h +++ b/libcore/Video.h @@ -127,8 +127,12 @@ private: /// Last decoded frame std::auto_ptr _lastDecodedVideoFrame; - /// The decoder used to decode the video frames - std::auto_ptr _decoder; + /// The decoder used to decode the video frames for embedded streams + // + /// For dynamically loaded videos NetStream takes care of decoding + /// see the _ns property + /// + std::auto_ptr _decoder; /// Whether to request smoothing when the video is scaled bool _smoothing; -- 2.11.4.GIT