Bugreport - channel switch

Hi all,

When switching from mpeg2 tvheadend tv source to mpeg4 the image freezes on mpeg2 source and audio plays (badly - “buffering” every few sec.) and it does not respond to any remote key so the only “fix” is reboot
If that does not happen then the sad face happens and it reboots.

This happens no matter if you are in full screen or not.

here’s the log from when it gets stuck

22:22:13 8419.235352 T:1957204912 NOTICE: DVDPlayer: Opening: pvr://channels/tv/All channels/pvr.hts_2141926997.pvr
22:22:13 8419.236328 T:1957204912 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:22:13 8419.252930 T:1464853488 NOTICE: Creating InputStream
22:22:13 8419.413086 T:1464853488 NOTICE: Creating Demuxer
22:22:13 8419.414062 T:1464853488 ERROR: Get - failed to get stream
22:22:13 8419.414062 T:1464853488 WARNING: CDVDMessageQueue(audio)::Put MSGQ_NOT_INITIALIZED
22:22:13 8419.414062 T:1464853488 WARNING: CDVDMessageQueue(video)::Put MSGQ_NOT_INITIALIZED
22:22:13 8419.419922 T:1706030064 NOTICE: 1Channel: Service: Playback started
22:22:20 8426.775391 T:1464853488 NOTICE: Opening stream: 0 source: 256
22:22:20 8426.783203 T:1464853488 NOTICE: Creating video codec with codec id: 2
22:22:20 8426.783203 T:1464853488 WARNING: CMMALVideo::Open Codec mmal-mpeg2 is not supported
22:22:20 8426.784180 T:1464853488 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
22:22:20 8426.785156 T:1464853488 NOTICE: Creating video thread
22:22:20 8426.785156 T:1414525936 NOTICE: running thread: video_thread
22:22:20 8426.786133 T:1464853488 NOTICE: Opening stream: 2 source: 256
22:22:20 8426.786133 T:1464853488 NOTICE: Finding audio codec for: 86016
22:22:20 8426.787109 T:1464853488 NOTICE: Creating audio thread
22:22:20 8426.787109 T:1406137328 NOTICE: running thread: CDVDPlayerAudio::Process()
22:22:20 8426.787109 T:1464853488 NOTICE: Opening stream: 4 source: 256
22:22:20 8426.787109 T:1464853488 NOTICE: Opening stream: 3 source: 256
22:22:20 8426.788086 T:1464853488 NOTICE: CDVDMessageQueue(teletext)::WaitUntilEmpty
22:22:20 8426.788086 T:1464853488 WARNING: CDVDMessageQueue(teletext)::Put MSGQ_NOT_INITIALIZED
22:22:20 8426.788086 T:1464853488 NOTICE: waiting for teletext data thread to exit
22:22:20 8426.791992 T:1464853488 NOTICE: Creating teletext data thread
22:22:20 8426.791992 T:1397748720 NOTICE: running thread: CDVDTeletextData
22:22:20 8426.792969 T:1464853488 NOTICE: Opening stream: 2 source: 256
22:22:20 8426.792969 T:1464853488 NOTICE: Finding audio codec for: 86016
22:22:20 8426.794922 T:1406137328 NOTICE: Creating audio stream (codec id: 86016, channels: 2, sample rate: 48000, no pass-through)
22:22:20 8426.795898 T:1406137328 NOTICE: CDVDPlayerAudio::OutputPacket duplicate 4 packets of duration 24
22:22:20 8426.800781 T:1464853488 NOTICE: Opening stream: 0 source: 256
22:22:20 8426.801758 T:1464853488 NOTICE: Creating video codec with codec id: 2
22:22:20 8426.801758 T:1464853488 WARNING: CMMALVideo::Open Codec mmal-mpeg2 is not supported
22:22:20 8426.801758 T:1464853488 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
22:22:20 8426.834961 T:1414525936 NOTICE: fps: 25.000000, pwidth: 544, pheight: 576, dwidth: 544, dheight: 304
22:22:20 8426.834961 T:1414525936 NOTICE: Display resolution DESKTOP : 1920x1080 (1920x1080) @ 60.00 - Full Screen (16)
22:22:20 8426.925781 T:1406137328 NOTICE: CDVDPlayerAudio::OutputPacket duplicate 4 packets of duration 24
22:22:20 8426.930664 T:1406137328 NOTICE: Previous line repeats 1 times.
22:22:20 8426.931641 T:1406137328 NOTICE: CDVDPlayerAudio::OutputPacket duplicate 1 packets of duration 24
22:22:20 8427.021484 T:1406137328 NOTICE: Previous line repeats 1 times.
22:22:20 8427.021484 T:1406137328 NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 24
22:22:35 8441.743164 T:1464853488 NOTICE: Previous line repeats 1 times.
22:22:35 8441.743164 T:1464853488 NOTICE: PVRManager - PerformChannelSwitch - switched to channel ‘Doma TV’
22:22:35 8441.744141 T:1464853488 NOTICE: Creating Demuxer
22:22:35 8441.745117 T:1464853488 NOTICE: Opening stream: 0 source: 256
22:22:35 8441.745117 T:1464853488 NOTICE: Creating video codec with codec id: 28
22:22:35 8441.756836 T:1478226928 ERROR: CMMALVideo::dec_control_port_cb Error (status=7 EIO)
22:22:35 8441.756836 T:1464853488 ERROR: Previous line repeats 4 times.
22:22:35 8441.756836 T:1464853488 NOTICE: Opening stream: 1 source: 256
22:22:35 8441.757812 T:1464853488 NOTICE: Finding audio codec for: 86016
22:22:35 8441.758789 T:1464853488 NOTICE: Closing stream player 3
22:22:35 8441.758789 T:1464853488 NOTICE: Opening stream: 2 source: 256
22:22:35 8441.759766 T:1464853488 NOTICE: Opening stream: 1 source: 256
22:22:35 8441.759766 T:1464853488 NOTICE: Finding audio codec for: 86016
22:22:35 8441.765625 T:1478226928 ERROR: CMMALVideo::dec_control_port_cb Error (status=7 EIO)
22:22:35 8441.913086 T:1464853488 ERROR: Previous line repeats 59 times.
22:22:35 8441.913086 T:1464853488 NOTICE: Opening stream: 0 source: 256
22:22:35 8441.913086 T:1464853488 NOTICE: Creating video codec with codec id: 28
22:22:35 8441.931641 T:1313858544 ERROR: CMMALVideo::dec_control_port_cb Error (status=7 EIO)
22:22:36 8442.711914 T:1406137328 ERROR: Previous line repeats 40 times.
22:22:36 8442.711914 T:1406137328 NOTICE: CDVDPlayerAudio::OutputPacket duplicate 2 packets of duration 24
22:22:36 8442.716797 T:1406137328 NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 24

Have you purchased and installed the mpeg2 codec yet?

mpeg2 works (no lic), picture is there,all good but when you change channel to mpeg4 channel you got stuck with what I’ve said in my post.

By looking at the logs:
22:22:13 8419.419922 T:1706030064 NOTICE: 1Channel: Service: Playback started
so, we have playback

22:22:20 8426.783203 T:1464853488 NOTICE: Creating video codec with codec id: 2
22:22:20 8426.783203 T:1464853488 WARNING: CMMALVideo::Open Codec mmal-mpeg2 is not supported
22:22:20 8426.784180 T:1464853488 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video

then we have a channel change event

22:22:35 8441.743164 T:1464853488 NOTICE: PVRManager - PerformChannelSwitch - switched to channel ‘Doma TV’
22:22:35 8441.744141 T:1464853488 NOTICE: Creating Demuxer
22:22:35 8441.745117 T:1464853488 NOTICE: Opening stream: 0 source: 256
22:22:35 8441.745117 T:1464853488 NOTICE: Creating video codec with codec id: 28
22:22:35 8441.756836 T:1478226928 ERROR: CMMALVideo::dec_control_port_cb Error (status=7 EIO)
22:22:35 8441.756836 T:1464853488 ERROR: Previous line repeats 4 times.

I’ve also tried to disable mmal HW accel and do the same thing, ended up with sad face.

It is not a confirmed bug if you have not made every effort to resolve the issue by using all tools available.

If you haven’t noticed, I’m giving you a hint, Sir.

Yes, I believe without a license you will have problems changing between different stream types.

I think this is resolved in the upcoming Kodi Krypton but it may be worth buying the license

Correct. Jarvis doesn’t handle a stream changing between hardware and software decode without manually stopping.
Get the MPEG-2 codec licence or update to a Krypton test build (or wait for Krypton to become stable pretty soon).