Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Question about returning unsigned long in Interfaces.cs #1130

Description

@HopingCoding

Some MediaFoundation classes return UInt64. Example: https://docs.microsoft.com/en-us/windows/desktop/medfound/mf-mt-frame-rate-attribute

However in the autogenerated Interfaces.cs of SharpDX I could not find any GetULong() instead the GetLong() is used which casts ulong to long and therefore might cause troubles with overflows.

I am suspecting this, because the following call returns wrong framerate values in certain videos which have fractional framerates:

var mediaType = sourceReader.GetCurrentMediaType(_videoStreamIndex);
var rate = mediaType.Get(MediaTypeAttributeKeys.FrameRate); //returns 42949672960497499

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions