diff --git a/libavcodec/h264.c b/libavcodec/h264.c index f5a8833fa00c71591f518f45263825172bac8ad6..310251d59a98d7d50c20a5b0f97b6ac17bc434bc 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -7425,8 +7425,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ && avctx->skip_frame < AVDISCARD_ALL){ if(ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU){ static const uint8_t start_code[] = {0x00, 0x00, 0x01}; - ff_vdpau_h264_add_data_chunk(h, start_code, sizeof(start_code)); - ff_vdpau_h264_add_data_chunk(h, &buf[buf_index - consumed], consumed ); + ff_vdpau_h264_add_data_chunk(s, start_code, sizeof(start_code)); + ff_vdpau_h264_add_data_chunk(s, &buf[buf_index - consumed], consumed ); }else context_count++; } diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h index a989d89d29338ff7d5d03cc19c5d0e4b99cd72dc..8e120c30f8cd450fb857f4920fb041673d700dc3 100644 --- a/libavcodec/vdpau_internal.h +++ b/libavcodec/vdpau_internal.h @@ -27,7 +27,7 @@ #include <stdint.h> #include "h264.h" -void ff_vdpau_h264_add_data_chunk(H264Context *h, const uint8_t *buf, +void ff_vdpau_h264_add_data_chunk(MpegEncContext *s, const uint8_t *buf, int buf_size); void ff_vdpau_h264_set_reference_frames(H264Context *h); void ff_vdpau_h264_picture_complete(H264Context *h); diff --git a/libavcodec/vdpauvideo.c b/libavcodec/vdpauvideo.c index 248716ac203301567d3d730241a34eb51e0b75ca..e79fa5ac4ae43350ab3443e1b6f351424c92eb8d 100644 --- a/libavcodec/vdpauvideo.c +++ b/libavcodec/vdpauvideo.c @@ -106,10 +106,9 @@ void ff_vdpau_h264_set_reference_frames(H264Context *h) } } -void ff_vdpau_h264_add_data_chunk(H264Context *h, +void ff_vdpau_h264_add_data_chunk(MpegEncContext *s, const uint8_t *buf, int buf_size) { - MpegEncContext * s = &h->s; struct vdpau_render_state * render; render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];