[vlc-commits] avodec: call es_format_Change() where possible

Steve Lhomme git at videolan.org
Sat Jul 8 18:37:54 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Jul  5 13:36:25 2017 +0200| [07667930bd7a1c34ad823e21ce4ddfdf245bf2fa] | committer: Jean-Baptiste Kempf

avodec: call es_format_Change() where possible

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07667930bd7a1c34ad823e21ce4ddfdf245bf2fa
---

 modules/codec/avcodec/video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index a8003878ac..711c9b0e55 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -321,8 +321,7 @@ static int lavc_UpdateVideoFormat(decoder_t *dec, AVCodecContext *ctx,
     fmt_out.p_palette = dec->fmt_out.video.p_palette;
     dec->fmt_out.video.p_palette = NULL;
 
-    es_format_Clean(&dec->fmt_out);
-    es_format_Init(&dec->fmt_out, VIDEO_ES, fmt_out.i_chroma);
+    es_format_Change(&dec->fmt_out, VIDEO_ES, fmt_out.i_chroma);
     dec->fmt_out.video = fmt_out;
     dec->fmt_out.video.orientation = dec->fmt_in.video.orientation;
     dec->fmt_out.video.projection_mode = dec->fmt_in.video.projection_mode;



More information about the vlc-commits mailing list