metadata: Fix potential crash on 3GP scanning

If we encounter a 3GP video file with no audio stream, we could end up
accessing out-of-bounds memory.
This commit is contained in:
Justin Maggard 2017-05-01 17:40:20 -07:00
parent da7d868c4b
commit f816911f0c

View File

@ -1273,8 +1273,8 @@ GetVideoMetadata(const char *path, char *name)
off += sprintf(m.dlna_pn+off, "3GPP_SP_L0B_AMR");
break;
default:
DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for MPEG4-P2 3GP/0x%X file %s\n",
lav_codec_id(astream), basepath);
DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for MPEG4-P2 3GP/%d file %s\n",
audio_profile, basepath);
free(m.dlna_pn);
m.dlna_pn = NULL;
break;