History

lavf: add av_guess_frame_sample_aspect_ratio function

Guesses the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio. Since the frame aspect ratio is set by the codec but the stream aspect ratio is set by the demuxer, these two may not be equal. This function tries to return the value that you should use if you would like to display the frame. Basic logic is to use the stream aspect ratio if it is set to something sane otherwise use the frame aspect ratio. This way a container setting, which is usually easy to modify can override the coded value in the frames.

Marton Balint committed 14 years ago

Commit 94a9ac11 parent 9cf5bcd4 files · +46 −1Browse files

Showing the changes to doc/APIchanges (1 of 4 files). Show all

Unified · Split

doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2011-04-18 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182012-05-07 - xxxxxxx - lavf 54.5.100
19 Add av_guess_sample_aspect_ratio() function.
20
182012-04-20 - xxxxxxx - lavfi 2.70.100212012-04-20 - xxxxxxx - lavfi 2.70.100
19 Add avfilter_unref_bufferp() to avfilter.h.22 Add avfilter_unref_bufferp() to avfilter.h.
20 23

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t