<!-- READ THIS FIRST:
- If you need additional help with this template please r…efer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
- Frontend issues should be submitted to the home-assistant-polymer repository: https://github.com/home-assistant/home-assistant-polymer/issues
- iOS issues should be submitted to the home-assistant-iOS repository: https://github.com/home-assistant/home-assistant-iOS/issues
- Do not report issues for components if you are using custom components: files in <config-dir>/custom_components
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
- Provide as many details as possible. Paste logs, configuration sample and code into the backticks. Do not delete any text from this template!
-->
**Home Assistant release with the issue:**
0.91.1
**Last working Home Assistant release (if known):**
None
**Operating environment (Hass.io/Docker/Windows/etc.):**
RPi 3B/Raspbian/Python 3.7.2/venv
**Component/platform:**
stream, camera/generic
**Description of problem:**
I use generic camera and stream component. When I tap on camera card in Lovelace on iPad (iOS app 1.5) I have errors in log, stream don't start and sometimes after that my HA hangs up. The frontend doesn't work, the light control automation doesn't start, systemctl shows that the HA service is active (running). I have to restart HA to using it. This is the first time HA has been hanging since I use it (2 years).
**Problem-relevant `configuration.yaml` entries and (fill out even if it seems unimportant):**
```
camera:
- platform: generic
name: 'Salon'
still_image_url: http://<camera_ip>/cgi-bin/currentpic.cgi
stream_source: rtsp://<camera_ip>:8554/unicast
stream:
```
**Traceback (if applicable):**
```
2019-04-06 13:02:41 ERROR (stream_worker) [libav.mpegts] H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb' option with ffmpeg)
2019-04-06 13:04:53 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 216, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 114, in handle
result = await result
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/websocket_api/http.py", line 36, in get
request.app['hass'], request).async_handle()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/websocket_api/http.py", line 188, in async_handle
await self._writer_task
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/websocket_api/http.py", line 63, in _writer
await self.wsock.send_json(message, dumps=JSON_DUMP)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_ws.py", line 296, in send_json
await self.send_str(dumps(data), compress=compress)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_ws.py", line 283, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/http_websocket.py", line 643, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/http_websocket.py", line 620, in _send_frame
await self.protocol._drain_helper()
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/base_protocol.py", line 81, in _drain_helper
await waiter
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 801, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
2019-04-06 13:04:53 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 447, in start
await resp.prepare(request)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_response.py", line 353, in prepare
return await self._start(request)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_response.py", line 667, in _start
return await super()._start(request)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_response.py", line 410, in _start
await writer.write_headers(status_line, headers)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/http_writer.py", line 112, in write_headers
self._write(buf)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write
raise ConnectionResetError('Cannot write to closing transport')
ConnectionResetError: Cannot write to closing transport
```