Skip to content

Commit

Permalink
only pick up the first video track's duration
Browse files Browse the repository at this point in the history
  • Loading branch information
odrling committed Aug 1, 2024
1 parent bab6091 commit 25e4853
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libdakara_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ static void dakara_check_avf(AVFormatContext *s, dakara_check_results *res) {

switch (par->codec_type) {
case AVMEDIA_TYPE_VIDEO:
duration = st->duration * st->time_base.num / st->time_base.den;
if (duration <= 0)
duration = st->duration * st->time_base.num / st->time_base.den;
if (video_streams++ > 0) {
res->report.errors.too_many_video_streams = true;
}
Expand Down

0 comments on commit 25e4853

Please sign in to comment.