mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-25 09:51:06 +08:00
lavc/avconv: support changing frame sizes in codecs with frame mt.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
committed by
Anton Khirnov
parent
e20ad71ebb
commit
bc1ef85520
@@ -392,11 +392,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
|
||||
buf = &avci->buffer[avci->buffer_count];
|
||||
|
||||
if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)){
|
||||
if(s->active_thread_type&FF_THREAD_FRAME) {
|
||||
av_log_missing_feature(s, "Width/height changing with frame threads is", 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
|
||||
av_freep(&buf->base[i]);
|
||||
buf->data[i]= NULL;
|
||||
@@ -480,6 +475,10 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
|
||||
}
|
||||
pic->extended_data = pic->data;
|
||||
avci->buffer_count++;
|
||||
pic->width = buf->width;
|
||||
pic->height = buf->height;
|
||||
pic->format = buf->pix_fmt;
|
||||
pic->sample_aspect_ratio = s->sample_aspect_ratio;
|
||||
|
||||
if(s->pkt) pic->pkt_pts= s->pkt->pts;
|
||||
else pic->pkt_pts= AV_NOPTS_VALUE;
|
||||
|
||||
Reference in New Issue
Block a user