History

avcodec/utils: set AVFrame format unconditional

Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer committed 12 years ago

Commit e5c72291 parent d1e66021 file · +1 −2Browse files

Unified · Split

libavcodec/utils.c+1−2
@@ -766,8 +766,7 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) · 765 unmodified lines
766 766
767 switch (avctx->codec->type) {767 switch (avctx->codec->type) {
768 case AVMEDIA_TYPE_VIDEO:768 case AVMEDIA_TYPE_VIDEO:
769 if (frame->format < 0)769 frame->format = avctx->pix_fmt;
770 frame->format = avctx->pix_fmt;
771 if (!frame->sample_aspect_ratio.num)770 if (!frame->sample_aspect_ratio.num)
772 frame->sample_aspect_ratio = avctx->sample_aspect_ratio;771 frame->sample_aspect_ratio = avctx->sample_aspect_ratio;
773 if (av_frame_get_colorspace(frame) == AVCOL_SPC_UNSPECIFIED)772 if (av_frame_get_colorspace(frame) == AVCOL_SPC_UNSPECIFIED)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t