summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-09 03:23:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-31 12:00:15 +0100
commit8af82be946186921d8391eff3a82815d75b44b99 (patch)
treec2107d290f370b164546498a71191e8ce5e3fced /libavcodec/mpegvideo.c
parentebbdb928e88e160fddedf6eb182503bfefadb37d (diff)
avcodec/mpegvideo: Merge ff_mpv_decode_defaults into ff_mpv_decode_init
These two are always called directly after each other (with the exception of the calls in mpeg_decode_init() where some irrelevant modifications of the avctx (which could just as well be done before ff_mpv_decode_defaults(), because it doesn't have a pointer to the AVCodecContext at all and therefore can't see these modifications at all) are performed in between), so merge ff_mpv_decode_defaults() in ff_mpv_decode_init(). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index c28d1adef7..f92792ae98 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -660,17 +660,14 @@ void ff_mpv_common_defaults(MpegEncContext *s)
}
/**
- * Set the given MpegEncContext to defaults for decoding.
+ * Initialize the given MpegEncContext for decoding.
* the changed fields will not depend upon
* the prior state of the MpegEncContext.
*/
-void ff_mpv_decode_defaults(MpegEncContext *s)
+void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
{
ff_mpv_common_defaults(s);
-}
-void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
-{
s->avctx = avctx;
s->width = avctx->coded_width;
s->height = avctx->coded_height;