mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 20:32:33 +00:00
Added a flag "aspect_ratio_given" so that aspect_ratio itself can be set to whatever is necessary while retaining the information about the cmdline.
This commit is contained in:
parent
ed95388324
commit
086d8727a3
@ -1415,6 +1415,7 @@ static void parse_args(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
ti.aspect_ratio = parse_aspect_ratio(argv[i + 1]);
|
||||
ti.aspect_ratio_given = true;
|
||||
i++;
|
||||
|
||||
} else if (!strcmp(argv[i], "-y") || !strcmp(argv[i], "--sync")) {
|
||||
@ -1529,7 +1530,7 @@ static void parse_args(int argc, char **argv) {
|
||||
ti.languages = new vector<language_t>;
|
||||
ti.sub_charsets = new vector<language_t>;
|
||||
ti.all_tags = new vector<tags_t>;
|
||||
ti.aspect_ratio = 1.0;
|
||||
ti.aspect_ratio = 0.0;
|
||||
ti.atracks = new vector<int64_t>;
|
||||
ti.vtracks = new vector<int64_t>;
|
||||
ti.stracks = new vector<int64_t>;
|
||||
|
@ -409,7 +409,7 @@ void generic_packetizer_c::set_headers() {
|
||||
GetChild<KaxTrackVideo>(*track_entry);
|
||||
|
||||
if ((hvideo_pixel_height != -1) && (hvideo_pixel_width != -1)) {
|
||||
if (ti->aspect_ratio == 0.0)
|
||||
if (!ti->aspect_ratio_given)
|
||||
ti->aspect_ratio = (float)hvideo_pixel_width /
|
||||
(float)hvideo_pixel_height;
|
||||
if (ti->aspect_ratio >
|
||||
|
@ -89,6 +89,7 @@ typedef struct {
|
||||
|
||||
char fourcc[5];
|
||||
float aspect_ratio;
|
||||
bool aspect_ratio_given;
|
||||
|
||||
vector<audio_sync_t> *audio_syncs; // As given on the command line
|
||||
audio_sync_t async; // For this very track
|
||||
|
Loading…
Reference in New Issue
Block a user