Modify

Ticket #7961 (closed patch: fixed)

Opened 2 years ago

Last modified 2 years ago

Fix handling of streams without PTS values in every frame

Reported by: peter.alm@… Owned by: janne
Priority: critical Milestone: 0.23
Component: MythTV - Video Playback Version: 0.22-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The current handling of streams without pts values in every frame is broken, frames without a stored pts value will have a temppts value of 0, not below 0 which the current check looks for.

Another problem with the current implementation is that it uses time_base when interpolating the pts value, on the channels I have seen that does not set the pts value, the time_base value is not a 1:1 mapping to the frame rate (50fps vs a time_base of 90,000) so this patch changes this behaviour to use curstream->r_frame_rate instead.

Attachments

pts.diff (1012 bytes) - added by peter.alm@… 2 years ago.

Change History

Changed 2 years ago by peter.alm@…

comment:1 Changed 2 years ago by anonymous

Forgot to set a few fields:

Version should be 0.22-fixes Component should be MythTV - Video Playback

comment:2 Changed 2 years ago by stuarta

  • Owner changed from ijr to janne
  • Version changed from unknown to 0.22-fixes
  • Component changed from MythTV - General to MythTV - Video Playback
  • Milestone changed from unknown to 0.23

comment:3 Changed 2 years ago by stuartm

  • Priority changed from minor to critical

comment:4 Changed 2 years ago by tralph

Peter, please provide a short sample which demonstrates your problem. You can use something like dd if=video.mpg of=video_small.mpg bs=1024 count=50000 to generate a 50MB file and upload to filebin.ca.

comment:5 Changed 2 years ago by peter.alm@…

comment:6 Changed 2 years ago by tralph

  • Status changed from new to closed
  • Resolution set to fixed

(In [23612]) Correct the video timestamp fixup code by making the following changes:

  • Perform fixup when PTS is not available which is indicated by temppts == 0.
  • Calculate temppts using fps instead of context->time_base. The prior calculation was actually wrong since it also needed to be multiplied by context->ticks_per_frame. Using fps also allows us to be consistent with normalized_fps().

This commit is a slight modification of the provided patch.

Thanks to Peter Alm for the patch and sample.

Fixes #7961.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.