]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Avoid division by zero
authorAndreas Öman <andreas@lonelycoder.com>
Sat, 5 May 2012 20:16:14 +0000 (22:16 +0200)
committerAndreas Öman <andreas@lonelycoder.com>
Sat, 5 May 2012 20:16:14 +0000 (22:16 +0200)
src/parser_latm.c

index 9d7369a9e9303cc25ca4a7c529dbf19d33d35b36..eca91b80e9c3f6ba3bd7412f3d49327fbaae2f6b 100644 (file)
@@ -71,6 +71,9 @@ read_audio_specific_config(elementary_stream_t *st, latm_private_t *latm,
   else
     sr = sri_to_rate(latm->sample_rate_index);
 
+  if(sr == 0)
+    return;
+
   st->es_frame_duration = 1024 * 90000 / sr;
 
   latm->channel_config = read_bits(bs, 4);