Browse Source

Use only MpegEncContext in ff_vdpau_h264_add_data_chunk.

Originally committed as revision 16520 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Carl Eugen Hoyos 17 years ago
parent
commit
1968e438d0
3 changed files with 4 additions and 5 deletions
  1. +2
    -2
      libavcodec/h264.c
  2. +1
    -1
      libavcodec/vdpau_internal.h
  3. +1
    -2
      libavcodec/vdpauvideo.c

+ 2
- 2
libavcodec/h264.c View File

@@ -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++;
}


+ 1
- 1
libavcodec/vdpau_internal.h View File

@@ -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);


+ 1
- 2
libavcodec/vdpauvideo.c View File

@@ -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];


Loading…
Cancel
Save