aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-03-22 04:35:46 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-03-22 04:35:46 +0000
commit8a29b31054fb707106e199d73bebb5da67d2017e (patch)
treeb00a783101070bf1d403324d5b0ef54c4fed46b1 /libavcodec
parent7084c149d94876afd363dac3cbe3c3598d816091 (diff)
downloadffmpeg-8a29b31054fb707106e199d73bebb5da67d2017e.tar.gz
mpeg1 & epzs fix
Originally committed as revision 347 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 180addb6f6..eb963fd4d0 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -174,7 +174,7 @@ int MPV_common_init(MpegEncContext *s)
}
}
- if (s->out_format == FMT_H263) {
+ if (s->out_format == FMT_H263 || s->encoding) {
int size;
/* MV prediction */
size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2);
@@ -961,8 +961,9 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
else if (s->h263_pred || s->h263_aic)
s->mbintra_table[mb_x + mb_y*s->mb_width]=1;
- /* update motion predictor, not for B-frames as they need the motion_val from the last P/S-Frame */
- if (s->out_format == FMT_H263) {
+ /* update motion predictor, not for B-frames as they need the motion_val from the last P/S-Frame
+ motion_val is needed for encodig too, as the ME needs it */
+ if (s->out_format == FMT_H263 || s->encoding) {
if(s->pict_type!=B_TYPE){
int xy, wrap, motion_x, motion_y;