fftools/ffmpeg_dec: drop always-0 InputStream.prev_sub.ret

pull/389/head
Anton Khirnov 2 years ago
parent 52d7ea6635
commit e9eb44ed88
  1. 1
      fftools/ffmpeg.h
  2. 3
      fftools/ffmpeg_dec.c

@ -365,7 +365,6 @@ typedef struct InputStream {
int fix_sub_duration; int fix_sub_duration;
struct { /* previous decoded subtitle and related variables */ struct { /* previous decoded subtitle and related variables */
int got_output; int got_output;
int ret;
AVSubtitle subtitle; AVSubtitle subtitle;
} prev_sub; } prev_sub;

@ -346,14 +346,13 @@ int process_subtitle(InputStream *ist, AVSubtitle *subtitle, int *got_output)
} }
} }
FFSWAP(int, *got_output, ist->prev_sub.got_output); FFSWAP(int, *got_output, ist->prev_sub.got_output);
FFSWAP(int, ret, ist->prev_sub.ret);
FFSWAP(AVSubtitle, *subtitle, ist->prev_sub.subtitle); FFSWAP(AVSubtitle, *subtitle, ist->prev_sub.subtitle);
if (end <= 0) if (end <= 0)
goto out; goto out;
} }
if (!*got_output) if (!*got_output)
return ret; return 0;
for (int i = 0; i < ist->nb_filters; i++) { for (int i = 0; i < ist->nb_filters; i++) {
ret = ifilter_sub2video(ist->filters[i], subtitle); ret = ifilter_sub2video(ist->filters[i], subtitle);

Loading…
Cancel
Save