{"action":"created","issue":{"url":"https://api.github.com/repos/yuvalk/demoLive555withFFMPEG/issues/1","labels_url":"https://api.github.com/repos/yuvalk/demoLive555withFFMPEG/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/yuvalk/demoLive555withFFMPEG/issues/1/comments","events_url":"https://api.github.com/repos/yuvalk/demoLive555withFFMPEG/issues/1/events","html_url":"https://github.com/yuvalk/demoLive555withFFMPEG/issues/1","id":61390908,"number":1,"title":"SDL causes memory increasing","user":{"login":"phamanhtuan","id":6246623,"avatar_url":"https://avatars.githubusercontent.com/u/6246623?v=3","gravatar_id":"","url":"https://api.github.com/users/phamanhtuan","html_url":"https://github.com/phamanhtuan","followers_url":"https://api.github.com/users/phamanhtuan/followers","following_url":"https://api.github.com/users/phamanhtuan/following{/other_user}","gists_url":"https://api.github.com/users/phamanhtuan/gists{/gist_id}","starred_url":"https://api.github.com/users/phamanhtuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phamanhtuan/subscriptions","organizations_url":"https://api.github.com/users/phamanhtuan/orgs","repos_url":"https://api.github.com/users/phamanhtuan/repos","events_url":"https://api.github.com/users/phamanhtuan/events{/privacy}","received_events_url":"https://api.github.com/users/phamanhtuan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-14T03:51:21Z","updated_at":"2015-03-14T21:46:59Z","closed_at":null,"body":"Hi, \r\nThank for sharing your code.\r\nIt seems that memory goes up when using SDL\r\nIt turns out when you allocate \r\nstruct SwsContext *sws;\r\n                sws = sws_getContext(\r\n                            c->width,\r\n                            c->height,\r\n                            PIX_FMT_YUV420P,\r\n                            c->width,\r\n                            c->height,\r\n                            PIX_FMT_YUV420P,\r\n                            SWS_BICUBIC,\r\n                            NULL,\r\n                            NULL,\r\n                            NULL\r\n                            );\r\nsws is not freed after displaying.\r\n\r\nI free it by using sws_freeContext(sws); and it worked.\r\n\r\nBy the way, can you please show me how to change rtsp stream url and play that stream again?\r\n\r\nThank you in advance!!!"},"comment":{"url":"https://api.github.com/repos/yuvalk/demoLive555withFFMPEG/issues/comments/80733868","html_url":"https://github.com/yuvalk/demoLive555withFFMPEG/issues/1#issuecomment-80733868","issue_url":"https://api.github.com/repos/yuvalk/demoLive555withFFMPEG/issues/1","id":80733868,"user":{"login":"yuvalk","id":2404459,"avatar_url":"https://avatars.githubusercontent.com/u/2404459?v=3","gravatar_id":"","url":"https://api.github.com/users/yuvalk","html_url":"https://github.com/yuvalk","followers_url":"https://api.github.com/users/yuvalk/followers","following_url":"https://api.github.com/users/yuvalk/following{/other_user}","gists_url":"https://api.github.com/users/yuvalk/gists{/gist_id}","starred_url":"https://api.github.com/users/yuvalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuvalk/subscriptions","organizations_url":"https://api.github.com/users/yuvalk/orgs","repos_url":"https://api.github.com/users/yuvalk/repos","events_url":"https://api.github.com/users/yuvalk/events{/privacy}","received_events_url":"https://api.github.com/users/yuvalk/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T21:46:59Z","updated_at":"2015-03-14T21:46:59Z","body":"fixed.\r\n\r\nthis example code get the url from cli, just pass it a different url and it will play it..\r\nactually you can even pass more than one url and it will play them by order.\r\n\r\nplease note though, that this example uses hardcoded width/height values (instead of reading it from the stream)"}}