Skip to content

[video_player_videohole] Fix crash/seek on progressive HTTP MPEG-TS live - #1087

Open
CodeToolPerson wants to merge 3 commits into
flutter-tizen:masterfrom
CodeToolPerson:fix/videohole-progressive-ts-live
Open

[video_player_videohole] Fix crash/seek on progressive HTTP MPEG-TS live#1087
CodeToolPerson wants to merge 3 commits into
flutter-tizen:masterfrom
CodeToolPerson:fix/videohole-progressive-ts-live

Conversation

@CodeToolPerson

@CodeToolPerson CodeToolPerson commented Aug 13, 2026

Copy link
Copy Markdown

Avoid calling adaptive GetLiveDuration on non-adaptive URIs, and skip seek/pause paths that fail when duration is zero.

Summary

Progressive HTTP MPEG-TS live URLs (e.g. plain .ts / /live/) can fail to start or crash with video_player_videohole:

  • adaptive GetLiveDuration may SIGSEGV on non-adaptive streams
  • duration == 0 triggers Dart seekTo(0) / pause paths that fail on live TS

Changes

  • Skip adaptive live-duration API for progressive live URIs; use a 1ms placeholder duration
  • Skip seek on live streams; treat pause as no-op when not PLAYING
  • Dart-side live/open-ended heuristic to avoid mistaken seek/pause

Test plan

  • Tizen TV: progressive HTTP .ts live starts and plays
  • Tizen TV: HLS .m3u8 still works
  • Seek/pause on live does not throw PlatformException / crash

Avoid calling adaptive GetLiveDuration on non-adaptive URIs, and skip
seek/pause paths that fail when duration is zero.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6189c0bae

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/video_player_videohole/lib/video_player.dart Outdated
Comment thread packages/video_player_videohole/CHANGELOG.md
@xiaowei-guan
xiaowei-guan requested a review from gin7773 August 14, 2026 02:08
@gin7773

gin7773 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Hello @CodeToolPerson ,

Thank you very much for submitting this PR! This fix is very valuable for handling progressive HTTP MPEG-TS live streams.
To better understand this issue, could you please provide the specific stream URL(s) where the above problem occurs? (My email: yying.jin@samsung.com) This will allow us to test and verify it on actual Tizen devices.

@CodeToolPerson

CodeToolPerson commented Aug 14, 2026

Copy link
Copy Markdown
Author

Hello @CodeToolPerson ,

Thank you very much for submitting this PR! This fix is very valuable for handling progressive HTTP MPEG-TS live streams. To better understand this issue, could you please provide the specific stream URL(s) where the above problem occurs? (My email: yying.jin@samsung.com) This will allow us to test and verify it on actual Tizen devices.

Hi @gin7773,
Thanks for reviewing!
Please try these public demo progressive HTTP MPEG-TS live URLs:
http://xtreamtiv.com:80/play/E1o93W1lAD1fdZHmyAsrcGeHcgIg_BiMeANP5oSoNXI/ts
http://ibo.noramc.me:80/play/8xxgw2oBnuA-Pr0tM1BSK7fNj7rivfQfFzQOwyul1lA

@gin7773

gin7773 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Hi @gin7773, Thanks for reviewing! Please try these public demo progressive HTTP MPEG-TS live URLs: http://xtreamtiv.com:80/play/E1o93W1lAD1fdZHmyAsrcGeHcgIg_BiMeANP5oSoNXI/ts http://ibo.noramc.me:80/play/8xxgw2oBnuA-Pr0tM1BSK7fNj7rivfQfFzQOwyul1lA

Hello @CodeToolPerson ,
Thank you for providing the demo URLs! I've tested both of them using our sample app on Tizen TV, and they played normally without any crashes.

Could you please share more details about the crash scenario you encountered?

  • Which Tizen version/device was used when the crash occurred?
  • What specific operations triggered the crash (e.g., initial play, seek, pause, or during stream playback)?
  • Are there any error logs or stack traces you can share?

This information will help us better understand the issue and verify whether the current fix addresses it properly.
Thanks!

@JSUYA

JSUYA commented Aug 14, 2026

Copy link
Copy Markdown
Member

+) The error currently occurring in CI (Analyze) is unrelated to this PR. Please ignore it.

@CodeToolPerson

Copy link
Copy Markdown
Author

Hi @gin7773, Thanks for reviewing! Please try these public demo progressive HTTP MPEG-TS live URLs: http://xtreamtiv.com:80/play/E1o93W1lAD1fdZHmyAsrcGeHcgIg_BiMeANP5oSoNXI/ts http://ibo.noramc.me:80/play/8xxgw2oBnuA-Pr0tM1BSK7fNj7rivfQfFzQOwyul1lA

Hello @CodeToolPerson , Thank you for providing the demo URLs! I've tested both of them using our sample app on Tizen TV, and they played normally without any crashes.

Could you please share more details about the crash scenario you encountered?

  • Which Tizen version/device was used when the crash occurred?
  • What specific operations triggered the crash (e.g., initial play, seek, pause, or during stream playback)?
  • Are there any error logs or stack traces you can share?

This information will help us better understand the issue and verify whether the current fix addresses it properly. Thanks!

Hi @gin7773,

Thanks for testing the demo URLs — they may not hit the same path.

I re-tested on a real TV just now:

  • Device: Samsung QA55Q60DAJXZK (Q60D), Tizen 9.0
  • Package: video_player_videohole 0.5.9 from pub.dev (stock)
  • Stream: Xtream-style progressive live MPEG-TS (.../live/.../*.ts)

Stock 0.5.9 logs:
initialized ok=true duration end=0:00:00.000000 playing=false
Unhandled Exception: PlatformException(Pause, Player pause failed, null, null)
#0 VideoPlayerVideoholeApi.pause
#1 VideoPlayerController._applyPlayPause

With this PR applied on the same device/URL:
duration end=0:00:00.001000
after play: playing=true err=null

So the failure is specifically when duration reports 0 on progressive live TS (Dart then hits pause/seek during init/play). The public demo /play/.../ts URLs may report a different duration and won’t reproduce.

I can email a temporary private .ts URL to yying.jin@samsung.com for your verification.

@CodeToolPerson

Copy link
Copy Markdown
Author

Hi @gin7773, Thanks for reviewing! Please try these public demo progressive HTTP MPEG-TS live URLs: http://xtreamtiv.com:80/play/E1o93W1lAD1fdZHmyAsrcGeHcgIg_BiMeANP5oSoNXI/ts http://ibo.noramc.me:80/play/8xxgw2oBnuA-Pr0tM1BSK7fNj7rivfQfFzQOwyul1lA

Hello @CodeToolPerson , Thank you for providing the demo URLs! I've tested both of them using our sample app on Tizen TV, and they played normally without any crashes.

Could you please share more details about the crash scenario you encountered?

  • Which Tizen version/device was used when the crash occurred?
  • What specific operations triggered the crash (e.g., initial play, seek, pause, or during stream playback)?
  • Are there any error logs or stack traces you can share?

This information will help us better understand the issue and verify whether the current fix addresses it properly. Thanks!

Temporary reproduction URLs emailed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants