Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Memory leak removed

  • Loading branch information...
commit 5b29146e143de1b0530d50cf93a06bd405338673 1 parent 80d30cb
@maxlapshin maxlapshin authored
View
2  src/formats/ts_lander.erl
@@ -465,7 +465,7 @@ send_video_config(#stream{consumer = Consumer} = Stream) ->
raw_body = false,
streamid = 1
},
- ?D({"Send decoder config to", Consumer}),
+ % ?D({"Send decoder config to", Consumer}),
Consumer ! {video_config, VideoFrame},
Stream#stream{video_config = DecoderConfig}
end.
View
2  src/media/file_play.erl
@@ -171,7 +171,7 @@ send_frame(Player, {ok, undefined}) ->
send_frame(#file_player{consumer = Consumer} = Player, {ok, done}) ->
?D("Video file finished"),
gen_fsm:send_event(Consumer, {status, ?NS_PLAY_COMPLETE, 1}),
- ?MODULE:ready(Player#file_player{sent_video_config = false, sent_audio_config = false, ts_prev = 0, pos = undefined});
+ ok;
send_frame(#file_player{consumer = Consumer, stream_id = StreamId} = Player, {ok, #video_frame{nextpos = NextPos} = Frame}) ->
% ?D({"Frame", Key, Frame#video_frame.timestamp_abs, NextPos}),
View
7 src/media/stream_media.erl
@@ -94,6 +94,13 @@ handle_call({create_player, Options}, {Caller, _Ref},
ems_play:send(Pid, Audio),
{reply, {ok, self()}, MediaInfo};
+
+handle_call(clients, _From, #media_info{clients = Clients} = MediaInfo) ->
+ Entries = lists:map(
+ fun([Pid]) -> gen_fsm:sync_send_event(Pid, info) end,
+ ets:match(Clients, {'$1'})),
+ {reply, Entries, MediaInfo};
+
handle_call({codec_config, video}, _From, #media_info{video_decoder_config = Config} = MediaInfo) ->
{reply, Config, MediaInfo};
Please sign in to comment.
Something went wrong with that request. Please try again.