Commit 4ec42b9f authored by David Flynn's avatar David Flynn Committed by Laurent Aimar

codec/dirac: Fix video format guessing

Signed-off-by: default avatarDavid Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: default avatarLaurent Aimar <fenrir@videolan.org>
parent f9aa3037
...@@ -351,7 +351,7 @@ static struct ...@@ -351,7 +351,7 @@ static struct
int i_approx_fps; int i_approx_fps;
VideoFormat i_vf; VideoFormat i_vf;
} dirac_format_guess[] = { } dirac_format_guess[] = {
/* Important: Keep this list ordered in decending picture height */ /* Important: Keep this list ordered in ascending picture height */
{1, 0, VIDEO_FORMAT_CUSTOM}, {1, 0, VIDEO_FORMAT_CUSTOM},
{120, 15, VIDEO_FORMAT_QSIF525}, {120, 15, VIDEO_FORMAT_QSIF525},
{144, 12, VIDEO_FORMAT_QCIF}, {144, 12, VIDEO_FORMAT_QCIF},
...@@ -481,7 +481,7 @@ static int OpenEncoder( vlc_object_t *p_this ) ...@@ -481,7 +481,7 @@ static int OpenEncoder( vlc_object_t *p_this )
*/ */
do do
{ {
if( dirac_format_guess[i].i_height < p_enc->fmt_in.video.i_height ) if( dirac_format_guess[i].i_height > p_enc->fmt_in.video.i_height )
{ {
guessed_video_fmt = dirac_format_guess[i-1].i_vf; guessed_video_fmt = dirac_format_guess[i-1].i_vf;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment