Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any fileds in AVFrame after crop_top/crop_bottom/crop_left/crop_right cannot fill correctly in 32bit system #295

Closed
1 of 3 tasks
29654761 opened this issue Mar 15, 2024 · 1 comment

Comments

@29654761
Copy link

29654761 commented Mar 15, 2024

Note: for support questions, please use stackoverflow or special repository on [github.com](in special repository github.com). This repository's issues are reserved for feature requests and bug reports.

  • **I'm submitting a ... **

    • bug report
    • feature request
    • support request or question => Please do not submit support request or questions here, see note at the top of this template.
  • Do you want to request a feature or report a bug?
    Report a bug

  • What is the current behavior?
    AVFrame struct fileds witch after crop_top/crop_bottom/crop_left/crop_right get disorderly order in 32bit

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem:
    For example
    AVFrame
    frame = ffmpeg.av_frame_alloc();
    frame->sample_rate = 48000;
    frame->format = (int)AVSampleFormat.AV_SAMPLE_FMT_S16;
    frame->nb_samples = 480;
    ffmpeg.av_channel_layout_default(&frame->ch_layout, 0);

av_channel_layout_default always return -22 because frame->ch_layout cannot fill correctly.
Any fileds in AVFrame after crop_top/crop_bottom/crop_left/crop_right cannot fill correctly in 32bit system .

  • What is the expected behavior?
    In c++ code crop_top/crop_bottom/crop_left/crop_right are defined with size_t , this sizeof(size_t) is 4 for 32bit system and 8 for 64bit system,
    but they are defined ulong in C# code, so alway 8 bytes size.

so please defined nint for crop_top/crop_bottom/crop_left/crop_right.

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:
    I used ffmpeg.autogen in arm32 for android

  • version:
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
@Ruslan-B
Copy link
Owner

I don't support 32bit anymore, however, you can generate your very own version then it might work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants