summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 4fd27ce72e..de58e8b40d 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -838,10 +838,11 @@ const char *get_codec_filename(const int cod_spec)
838 afmt, fname ? fname : "<unknown>"); 838 afmt, fname ? fname : "<unknown>");
839#else /* !HAVE_RECORDING */ 839#else /* !HAVE_RECORDING */
840 /* Always decoder */ 840 /* Always decoder */
841 if ((unsigned)cod_spec >= AFMT_NUM_CODECS) 841 int afmt = cod_spec;
842 cod_spec = AFMT_UNKNOWN; 842 if ((unsigned)afmt >= AFMT_NUM_CODECS)
843 fname = audio_formats[cod_spec].codec_root_fn; 843 afmt = AFMT_UNKNOWN;
844 logf("Codec: %d - %s", cod_spec, fname ? fname : "<unknown>"); 844 fname = audio_formats[afmt].codec_root_fn;
845 logf("Codec: %d - %s", afmt, fname ? fname : "<unknown>");
845#endif /* HAVE_RECORDING */ 846#endif /* HAVE_RECORDING */
846 847
847 return fname; 848 return fname;