Commit 81fbe7c8 authored by jehan's avatar jehan

create dummy file player for ring stream without file

parent f83e8627
......@@ -60,7 +60,12 @@ RingStream * ring_start_with_cb(const char *file,int interval,MSSndCard *sndcard
MSPinFormat pinfmt={0};
stream=(RingStream *)ms_new0(RingStream,1);
stream->source=_ms_create_av_player(file);
if (file) {
stream->source=_ms_create_av_player(file);
} else {
/*create dummy source*/
stream->source=ms_filter_new(MS_FILE_PLAYER_ID);
}
ms_filter_add_notify_callback(stream->source,ring_player_event_handler,stream,TRUE);
if (func!=NULL)
ms_filter_add_notify_callback(stream->source,func,user_data,FALSE);
......
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