[vlc-commits] avcodec: minor code factor
Rémi Denis-Courmont
git at videolan.org
Thu Apr 23 20:42:16 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 23 21:35:13 2015 +0300| [af9c67a5af68a1c141fa144c7787604fe6456c39] | committer: Rémi Denis-Courmont
avcodec: minor code factor
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=af9c67a5af68a1c141fa144c7787604fe6456c39
---
modules/codec/avcodec/video.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 23cb4df..0b75d0e 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -122,9 +122,12 @@ static int lavc_UpdateVideoFormat( decoder_t *p_dec,
{
int aligns[AV_NUM_DATA_POINTERS];
+ if (GetVlcChroma(&p_dec->fmt_out.video, p_context->pix_fmt))
+ return -1;
+
avcodec_align_dimensions2(p_context, &width, &height, aligns);
}
-
+ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
if( width == 0 || height == 0 || width > 8192 || height > 8192 )
{
@@ -145,11 +148,6 @@ static int lavc_UpdateVideoFormat( decoder_t *p_dec,
p_dec->fmt_out.video.i_visible_height = height;
}
- if( !hwaccel && GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) )
- return -1;
-
- p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
-
/* If an aspect-ratio was specified in the input format then force it */
if( p_dec->fmt_in.video.i_sar_num > 0 && p_dec->fmt_in.video.i_sar_den > 0 )
{
More information about the vlc-commits
mailing list