ad_libav: flush decoder output after last input packet