In case "!direct" we are not reusing the input buffers (due to e.g. insufficient alignment), but allocating new ones. These of course do not alias with the ones provided by the user, so these checks are always-false.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1172,11 +1172,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) · 1171 unmodified lines | |||
| 1172 | return ret; | 1172 | return ret; |
| 1173 | 1173 | ||
| 1174 | if (!direct) { | 1174 | if (!direct) { |
| 1175 | if (pic->f->data[0] + INPLACE_OFFSET == pic_arg->data[0] && | ||
| 1176 | pic->f->data[1] + INPLACE_OFFSET == pic_arg->data[1] && | ||
| 1177 | pic->f->data[2] + INPLACE_OFFSET == pic_arg->data[2]) { | ||
| 1178 | // empty | ||
| 1179 | } else { | ||
| 1180 | int h_chroma_shift, v_chroma_shift; | 1175 | int h_chroma_shift, v_chroma_shift; |
| 1181 | av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt, | 1176 | av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt, |
| 1182 | &h_chroma_shift, | 1177 | &h_chroma_shift, |
| @@ -1221,7 +1216,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) · 38 unmodified lines | |||
| 1221 | } | 1216 | } |
| 1222 | } | 1217 | } |
| 1223 | emms_c(); | 1218 | emms_c(); |
| 1224 | } | ||
| 1225 | } | 1219 | } |
| 1226 | ret = av_frame_copy_props(pic->f, pic_arg); | 1220 | ret = av_frame_copy_props(pic->f, pic_arg); |
| 1227 | if (ret < 0) { | 1221 | if (ret < 0) { |