diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-20 00:47:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-20 01:29:30 +0100 |
commit | be2e211dce2964f922e5dee54a7569ebd6efb0da (patch) | |
tree | a1b6e3a9f5b577230d8c9c2b5b5bcba289ee79f5 /libavcodec/mjpegenc.c | |
parent | f4f386dd00e594dc90eb32ae872ae8e22b08d179 (diff) | |
parent | 6b8b0fe2bc57fdd606074e52ba73cd9b3d95e644 (diff) | |
download | ffmpeg-streaming-be2e211dce2964f922e5dee54a7569ebd6efb0da.zip ffmpeg-streaming-be2e211dce2964f922e5dee54a7569ebd6efb0da.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
doxy: remove reference to removed api
examples: unbreak compilation
ttadec: cosmetics: reindent
sunrast: use RLE trigger macro inplace of the hard coded value.
sunrastenc: set keyframe flag for the output packet.
mpegvideo_enc: switch to encode2().
mpegvideo_enc: force encoding delay of at least 1 frame when low_delay=0
Conflicts:
doc/examples/muxing.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r-- | libavcodec/mjpegenc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index f68d269..6f6d775 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -452,11 +452,10 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64]) // maximum over s->mjpeg_vsample[i] #define V_MAX 2 -static int amv_encode_picture(AVCodecContext *avctx, - unsigned char *buf, int buf_size, void *data) -{ +static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, + AVFrame *pic, int *got_packet) - AVFrame* pic=data; +{ MpegEncContext *s = avctx->priv_data; int i; @@ -469,7 +468,7 @@ static int amv_encode_picture(AVCodecContext *avctx, pic->data[i] += (pic->linesize[i] * (s->mjpeg_vsample[i] * (8 * s->mb_height -((s->height/V_MAX)&7)) - 1 )); pic->linesize[i] *= -1; } - return ff_MPV_encode_picture(avctx,buf, buf_size, pic); + return ff_MPV_encode_picture(avctx, pkt, pic, got_packet); } AVCodec ff_mjpeg_encoder = { @@ -478,7 +477,7 @@ AVCodec ff_mjpeg_encoder = { .id = CODEC_ID_MJPEG, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, - .encode = ff_MPV_encode_picture, + .encode2 = ff_MPV_encode_picture, .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), @@ -490,7 +489,7 @@ AVCodec ff_amv_encoder = { .id = CODEC_ID_AMV, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, - .encode = amv_encode_picture, + .encode2 = amv_encode_picture, .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("AMV Video"), |