# HG changeset patch # User mmu_man # Date 1106911187 0 # Node ID 76d0af843707f8ae572b756149f88c347dcf3ded # Parent 570274d13064ec0d45e38fc4a3af343e1989d5e6 don't crash on null codec; by matthieu castet diff -r 570274d13064 -r 76d0af843707 movenc.c --- a/movenc.c Fri Jan 28 08:08:42 2005 +0000 +++ b/movenc.c Fri Jan 28 11:19:47 2005 +0000 @@ -515,9 +515,9 @@ put_be16(pb, 1); /* Frame count (= 1) */ memset(compressor_name,0,32); - if (track->enc->codec->name) + if (track->enc->codec && track->enc->codec->name) strncpy(compressor_name,track->enc->codec->name,31); - put_byte(pb, FFMAX(strlen(compressor_name),32) ); + put_byte(pb, strlen(compressor_name)); put_buffer(pb, compressor_name, 31); put_be16(pb, 0x18); /* Reserved */