mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-06 22:25:36 +01:00
lavc: set defaults in internal codec frames
This is required specifically for setting frame->format to -1, otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading the format from the output decoded frame will get misled. In particular fix regressions occurring with the pending vsrc_buffer patch.
This commit is contained in:
@@ -231,6 +231,7 @@ static av_cold int decode_init(AVCodecContext *avctx) {
|
||||
return 1;
|
||||
}
|
||||
c->bpp = avctx->bits_per_coded_sample;
|
||||
avcodec_get_frame_defaults(&c->pic);
|
||||
c->pic.data[0] = NULL;
|
||||
c->linelen = avctx->width * avctx->bits_per_coded_sample / 8;
|
||||
c->height = avctx->height;
|
||||
|
||||
Reference in New Issue
Block a user