You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
mpeg4video_parser: stop using deprecated avcodec_set_dimensions
This commit is contained in:
@ -20,6 +20,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "internal.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
#include "mpeg4video.h"
|
#include "mpeg4video.h"
|
||||||
@ -89,7 +90,9 @@ static int av_mpeg4_decode_header(AVCodecParserContext *s1,
|
|||||||
init_get_bits(gb, buf, 8 * buf_size);
|
init_get_bits(gb, buf, 8 * buf_size);
|
||||||
ret = ff_mpeg4_decode_picture_header(s, gb);
|
ret = ff_mpeg4_decode_picture_header(s, gb);
|
||||||
if (s->width && (!avctx->width || !avctx->height || !avctx->coded_width || !avctx->coded_height)) {
|
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;
|
||||||
}
|
}
|
||||||
s1->pict_type= s->pict_type;
|
s1->pict_type= s->pict_type;
|
||||||
pc->first_picture = 0;
|
pc->first_picture = 0;
|
||||||
|
Reference in New Issue
Block a user