comparison mpeg12.c @ 9355:54bc8a2727b0 libavcodec

Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows passing of packet-specific flags from demuxer to decoder, such as the keyframe flag, which appears necessary to playback corePNG P-frames. Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread "Google Summer of Code participation" on the mailinglist.
author rbultje
date Tue, 07 Apr 2009 15:59:50 +0000
parents cecf81f93756
children fc417197fe11
comparison
equal deleted inserted replaced
9354:174309386512 9355:54bc8a2727b0
2258 const uint8_t *buf, int buf_size); 2258 const uint8_t *buf, int buf_size);
2259 2259
2260 /* handle buffering and image synchronisation */ 2260 /* handle buffering and image synchronisation */
2261 static int mpeg_decode_frame(AVCodecContext *avctx, 2261 static int mpeg_decode_frame(AVCodecContext *avctx,
2262 void *data, int *data_size, 2262 void *data, int *data_size,
2263 const uint8_t *buf, int buf_size) 2263 AVPacket *avpkt)
2264 { 2264 {
2265 const uint8_t *buf = avpkt->data;
2266 int buf_size = avpkt->size;
2265 Mpeg1Context *s = avctx->priv_data; 2267 Mpeg1Context *s = avctx->priv_data;
2266 AVFrame *picture = data; 2268 AVFrame *picture = data;
2267 MpegEncContext *s2 = &s->mpeg_enc_ctx; 2269 MpegEncContext *s2 = &s->mpeg_enc_ctx;
2268 dprintf(avctx, "fill_buffer\n"); 2270 dprintf(avctx, "fill_buffer\n");
2269 2271