]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_premultiply.c
avformat/mp3dec: Check for occurances of headers within frames during probing
[ffmpeg] / libavfilter / vf_premultiply.c
index a9404b4eb3b56d1806cbc06903d7022b2ec8981b..60830e7e84f876bcc83bb91a4511d0717dd4524a 100644 (file)
@@ -186,7 +186,7 @@ static void premultiply16yuv(const uint8_t *mmsrc, const uint8_t *aasrc,
 
     for (y = 0; y < h; y++) {
         for (x = 0; x < w; x++) {
-            dst[x] = ((((msrc[x] - half) * (((asrc[x] >> 1) & 1) + asrc[x]))) >> shift) + half;
+            dst[x] = ((((msrc[x] - half) * (int64_t)(((asrc[x] >> 1) & 1) + asrc[x]))) >> shift) + half;
         }
 
         dst  += dlinesize / 2;
@@ -209,7 +209,7 @@ static void premultiply16offset(const uint8_t *mmsrc, const uint8_t *aasrc,
 
     for (y = 0; y < h; y++) {
         for (x = 0; x < w; x++) {
-            dst[x] = ((((msrc[x] - offset) * (((asrc[x] >> 1) & 1) + asrc[x])) + half) >> shift) + offset;
+            dst[x] = ((((msrc[x] - offset) * (int64_t)(((asrc[x] >> 1) & 1) + asrc[x])) + half) >> shift) + offset;
         }
 
         dst  += dlinesize / 2;
@@ -639,6 +639,8 @@ static int activate(AVFilterContext *ctx)
         int ret, status;
         int64_t pts;
 
+        FF_FILTER_FORWARD_STATUS_BACK_ALL(ctx->outputs[0], ctx);
+
         if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &frame)) > 0) {
             ret = filter_frame(ctx, &out, frame, frame);
             av_frame_free(&frame);