|
@@ -1467,7 +1467,7 @@ static int map_auto_video(Muxer *mux, const OptionsContext *o)
|
|
|
{
|
|
{
|
|
|
AVFormatContext *oc = mux->fc;
|
|
AVFormatContext *oc = mux->fc;
|
|
|
InputStream *best_ist = NULL;
|
|
InputStream *best_ist = NULL;
|
|
|
- int best_score = 0;
|
|
|
|
|
|
|
+ int64_t best_score = 0;
|
|
|
int qcr;
|
|
int qcr;
|
|
|
|
|
|
|
|
/* video: highest resolution */
|
|
/* video: highest resolution */
|
|
@@ -1478,16 +1478,16 @@ static int map_auto_video(Muxer *mux, const OptionsContext *o)
|
|
|
for (int j = 0; j < nb_input_files; j++) {
|
|
for (int j = 0; j < nb_input_files; j++) {
|
|
|
InputFile *ifile = input_files[j];
|
|
InputFile *ifile = input_files[j];
|
|
|
InputStream *file_best_ist = NULL;
|
|
InputStream *file_best_ist = NULL;
|
|
|
- int file_best_score = 0;
|
|
|
|
|
|
|
+ int64_t file_best_score = 0;
|
|
|
for (int i = 0; i < ifile->nb_streams; i++) {
|
|
for (int i = 0; i < ifile->nb_streams; i++) {
|
|
|
InputStream *ist = ifile->streams[i];
|
|
InputStream *ist = ifile->streams[i];
|
|
|
- int score;
|
|
|
|
|
|
|
+ int64_t score;
|
|
|
|
|
|
|
|
if (ist->user_set_discard == AVDISCARD_ALL ||
|
|
if (ist->user_set_discard == AVDISCARD_ALL ||
|
|
|
ist->st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO)
|
|
ist->st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO)
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
- score = ist->st->codecpar->width * ist->st->codecpar->height
|
|
|
|
|
|
|
+ score = ist->st->codecpar->width * (int64_t)ist->st->codecpar->height
|
|
|
+ 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
|
|
+ 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
|
|
|
+ 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
|
|
+ 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
|
|
|
if((qcr!=MKTAG('A', 'P', 'I', 'C')) && (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
|
|
if((qcr!=MKTAG('A', 'P', 'I', 'C')) && (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
|