-    if (ctx->encoder_flushing)
-        return AVERROR_EOF;
+    if (ctx->encoder_flushing) {
+        if (avctx->internal->draining)
+            return AVERROR_EOF;
+
+        ctx->encoder_flushing = 0;
+        ctx->first_packet_output = 0;
+        ctx->initial_pts[0] = AV_NOPTS_VALUE;
+        ctx->initial_pts[1] = AV_NOPTS_VALUE;
+        av_fifo_reset(ctx->timestamp_list);
+    }

      if (frame) {
          in_surf = get_free_frame(ctx);
--
2.16.4



Can this be applied?

I'm not opposing it, and will in fact apply it if nobody objects.

Still not sure if the API is intended to be used like that, but I can't think of anything it might break to offer this functionality.

A second opinion on this would be nice, otherwise I'll apply it with my next set of patches in a few days.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to