*/
#include "avcodec.h"
-#include "dsputil.h"
#include "internal.h"
#include "mpegvideo.h"
#include "mjpeg.h"
init_put_bits(&s->pb, pkt->data, pkt->size);
- *p = *pict;
+ av_frame_unref(p);
+ ret = av_frame_ref(p, pict);
+ if (ret < 0)
+ return ret;
p->pict_type= AV_PICTURE_TYPE_I;
p->key_frame= 1;