Shifted check of shortest to after repeatlast, to ensure shortest=1 is always honoured.
Showing the changes to libavfilter/framesync.c (1 of 1 file). Show all
Unified · Split
| @@ -127,16 +127,16 @@ int ff_framesync_configure(FFFrameSync *fs) · 126 unmodified lines | ||
| 127 | 127 | fs->opt_shortest = 1; |
| 128 | 128 | fs->opt_eof_action = EOF_ACTION_ENDALL; |
| 129 | 129 | } |
| 130 | − if (fs->opt_shortest) { | |
| 131 | − for (i = 0; i < fs->nb_in; i++) | |
| 132 | − fs->in[i].after = EXT_STOP; | |
| 133 | − } | |
| 134 | 130 | if (!fs->opt_repeatlast) { |
| 135 | 131 | for (i = 1; i < fs->nb_in; i++) { |
| 136 | 132 | fs->in[i].after = EXT_NULL; |
| 137 | 133 | fs->in[i].sync = 0; |
| 138 | 134 | } |
| 139 | 135 | } |
| 136 | + if (fs->opt_shortest) { | |
| 137 | + for (i = 0; i < fs->nb_in; i++) | |
| 138 | + fs->in[i].after = EXT_STOP; | |
| 139 | + } | |
| 140 | 140 | |
| 141 | 141 | if (!fs->time_base.num) { |
| 142 | 142 | for (i = 0; i < fs->nb_in; i++) { |