if ( ret == AVERROR(EAGAIN) && !frame ) continue;
FFPacket opkt;
ret = avcodec_receive_packet(avctx, opkt);
- if( !frame && ret == AVERROR_EOF ) return pkts;
- if( ret < 0 ) break;
+ if( !frame && (ret == AVERROR_EOF || ret == AVERROR(EAGAIN) )) return pkts;
+ //if( ret < 0 ) break;
ret = write_packet(opkt);
if( ret < 0 ) break;
++pkts;
plugin->input_ptr->get_color_model(),
plugin->input_ptr->get_w(),
local_package->row2 - local_package->row1);
- if( plugin->config.pits )
+ if( plugin->config.pits && plugin->config.pits_interval > 0 )
pits(output_rows,
plugin->input_ptr->get_color_model(),
plugin->input_ptr->get_w(),
local_package->row2 - local_package->row1);
- if( plugin->config.dust )
+ if( plugin->config.dust && plugin->config.dust_interval > 0 )
dusts(output_rows,
plugin->input_ptr->get_color_model(),
plugin->input_ptr->get_w(),
+++ /dev/null
---- a/libavcodec/aaccoder.c
-+++ b/libavcodec/aaccoder.c
-@@ -60,6 +60,8 @@
- * replace low energy non zero bands */
- #define NOISE_LAMBDA_REPLACE 1.948f
-
-+#undef B0
-+
- #include "libavcodec/aaccoder_trellis.h"
-
- typedef float (*quantize_and_encode_band_func)(struct AACEncContext *s, PutBitContext *pb,
-
---- a/libavcodec/hevc_mvs.c
-+++ b/libavcodec/hevc_mvs.c
-@@ -25,6 +25,8 @@
- #include "hevcdec.h"
- #include "threadframe.h"
-
-+#undef B0
-+
- static const uint8_t l0_l1_cand_idx[12][2] = {
- { 0, 1, },
- { 1, 0, },
---- a/libavcodec/opus_pvq.c
-+++ b/libavcodec/opus_pvq.c
-@@ -36,6 +36,8 @@
- #define CELT_PVQ_U(n, k) (ff_celt_pvq_u_row[FFMIN(n, k)][FFMAX(n, k)])
- #define CELT_PVQ_V(n, k) (CELT_PVQ_U(n, k) + CELT_PVQ_U(n, (k) + 1))
-
-+#undef B0
-+
- static inline int16_t celt_cos(int16_t x)
- {
- x = (MUL16(x, x) + 4096) >> 13;