Skip to content

Commit 711b6ca

Browse files
committed
for ossrs#250, basic stream caster framework. 2.0.104
1 parent 6463d22 commit 711b6ca

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

trunk/src/app/srs_app_server.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,16 @@ int SrsListener::cycle()
230230
#ifdef SRS_AUTO_STREAM_CASTER
231231
SrsUdpListener::SrsUdpListener(SrsServer* server, SrsListenerType type, SrsConfDirective* c) : SrsListener(server, type)
232232
{
233+
_type = type;
233234
nb_buf = SRS_UDP_MAX_PACKET_SIZE;
234235
buf = new char[nb_buf];
235-
caster = new SrsMpegtsOverUdp(c);
236+
237+
// the caller already ensure the type is ok,
238+
// we just assert here for unknown stream caster.
239+
srs_assert(_type == SrsListenerMpegTsOverUdp);
240+
if (_type == SrsListenerMpegTsOverUdp) {
241+
caster = new SrsMpegtsOverUdp(c);
242+
}
236243
}
237244

238245
SrsUdpListener::~SrsUdpListener()

trunk/src/core/srs_core.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3131
// current release version
3232
#define VERSION_MAJOR 2
3333
#define VERSION_MINOR 0
34-
#define VERSION_REVISION 103
34+
#define VERSION_REVISION 104
3535

3636
// server info.
3737
#define RTMP_SIG_SRS_KEY "SRS"

0 commit comments

Comments
 (0)