}
#endif /* CONFIG_FFMPEG_WITH_FRSH */
+void flush_buffered_frames(AVFormatContext *s)
+{
+ AVPacketList *pktl;
+ while ((pktl = s->packet_buffer)) {
+ av_free_packet(&pktl->pkt);
+ s->packet_buffer = pktl->next;
+ av_free(pktl);
+ }
+}
+
int main(int argc, char **argv)
{
int i;
opt_output_file("stream.mp4");
}
+ for (i=0; i<nb_input_files; i++)
+ flush_buffered_frames(input_files[i]);
+
ti = getutime();
#if CONFIG_FFMPEG_WITH_FRSH
if (frsh_stuff() < 0)