Skip to content

Commit

Permalink
Make VDPAU compile with libav53
Browse files Browse the repository at this point in the history
  • Loading branch information
andoma committed Apr 26, 2011
1 parent 88dbab5 commit a6e0926
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/video/vdpau.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,10 @@ vdpau_decode(struct media_codec *mc, struct video_decoder *vd,
AVFrame *frame = vd->vd_frame;

if(vd->vd_do_flush) {
AVPacket avpkt;
av_init_packet(&avpkt);
do {
avcodec_decode_video(ctx, frame, &got_pic, NULL, 0);
avcodec_decode_video2(ctx, frame, &got_pic, &avpkt);
} while(got_pic);

vd->vd_do_flush = 0;
Expand All @@ -395,7 +397,12 @@ vdpau_decode(struct media_codec *mc, struct video_decoder *vd,

vc->vc_mb = mb;

avcodec_decode_video(ctx, frame, &got_pic, mb->mb_data, mb->mb_size);
AVPacket avpkt;
av_init_packet(&avpkt);
avpkt.data = mb->mb_data;
avpkt.size = mb->mb_size;

avcodec_decode_video2(ctx, frame, &got_pic, &avpkt);

if(mp->mp_stats)
mp_set_mq_meta(mq, cw->codec, cw->codec_ctx);
Expand Down

0 comments on commit a6e0926

Please sign in to comment.