mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-25 09:51:06 +08:00
Merge commit '13207484bba8a8b78b40d5a22da8c9c555429089'
* commit '13207484bba8a8b78b40d5a22da8c9c555429089': mpeg4video_parser: stop using deprecated avcodec_set_dimensions mpeg12dec: stop using deprecated avcodec_set_dimensions mjpegdec: stop using deprecated avcodec_set_dimensions libvpxdec: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4video_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#define UNCHECKED_BITSTREAM_READER 1
|
||||
|
||||
#include "internal.h"
|
||||
#include "parser.h"
|
||||
#include "mpegvideo.h"
|
||||
#include "mpeg4video.h"
|
||||
@@ -91,7 +92,9 @@ static int av_mpeg4_decode_header(AVCodecParserContext *s1,
|
||||
init_get_bits(gb, buf, 8 * buf_size);
|
||||
ret = ff_mpeg4_decode_picture_header(s, gb);
|
||||
if (s->width && (!avctx->width || !avctx->height || !avctx->coded_width || !avctx->coded_height)) {
|
||||
avcodec_set_dimensions(avctx, s->width, s->height);
|
||||
ret = ff_set_dimensions(avctx, s->width, s->height);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
if((s1->flags & PARSER_FLAG_USE_CODEC_TS) && s->avctx->time_base.den>0 && ret>=0){
|
||||
av_assert1(s1->pts == AV_NOPTS_VALUE);
|
||||
|
||||
Reference in New Issue
Block a user