avplay: update get_buffer to be inline with avconv
The buffer must have its dimension, pixel format and aspect ratio set.
This commit is contained in:
parent
9fb7e14635
commit
6943fb47d3
4
avplay.c
4
avplay.c
@ -1564,6 +1564,10 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
|
||||
pic->opaque = ref;
|
||||
pic->type = FF_BUFFER_TYPE_USER;
|
||||
pic->reordered_opaque = codec->reordered_opaque;
|
||||
pic->width = codec->width;
|
||||
pic->height = codec->height;
|
||||
pic->format = codec->pix_fmt;
|
||||
pic->sample_aspect_ratio = codec->sample_aspect_ratio;
|
||||
if (codec->pkt) pic->pkt_pts = codec->pkt->pts;
|
||||
else pic->pkt_pts = AV_NOPTS_VALUE;
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user