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

FFmpegReader: Throw correct exception #647

Merged
merged 1 commit into from Mar 31, 2021

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Mar 15, 2021

The only reason an AV_ALLOCATE_FRAME() could fail is because
there wasn't enough memory to allocate the necessary buffers,
so if it returns a nullptr then throwing OutOfMemory makes
far more sense than throwing OutOfBoundsFrame.

Related to #644 (comment)

The only reason an `AV_ALLOCATE_FRAME()` could fail is because
there wasn't enough memory to allocate the necessary buffers,
so if it returns a `nullptr` then throwing `OutOfMemory` makes
far more sense than throwing `OutOfBoundsFrame`.
@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #647 (c1a4016) into develop (691fc83) will not change coverage.
The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #647   +/-   ##
========================================
  Coverage    51.53%   51.53%           
========================================
  Files          151      151           
  Lines        12231    12231           
========================================
  Hits          6303     6303           
  Misses        5928     5928           
Impacted Files Coverage Δ
src/FFmpegReader.cpp 68.35% <75.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 691fc83...c1a4016. Read the comment docs.

@ferdnyc ferdnyc merged commit 3f9b402 into OpenShot:develop Mar 31, 2021
@ferdnyc ferdnyc deleted the out-of-memory branch March 31, 2021 23:44
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

Successfully merging this pull request may close these issues.

None yet

1 participant