I thought it was because of these lines:
frame = frame - (seconds * (int)framerate);
int frames = frame % MAX(1,(int)round(framerate));
The first line isn't rounding the framerate so it is changing 23.976 to 23. I tried changing it but ran into compiling problems that I didn't have before.
As for NTSC drop frame timecode, it only applies to 29.97 and 59.94 frame rates. As far as I know there is no drop frame timecode for 23.976 video, at least I've never encountered it. Someone can do a fact check on that. In any case, the only times I had to deal with drop-frame timecode was on NTSC master tapes that had to be delivered for broadcast. All the editing and VFX workflows that I've encountered used non-drop timecode. In addition, the math is so much easier with non-drop frame timecode when converting from frame numbers to timecode and back.
In other words, if you strip out all the drop-frame code nobody should miss it.
Here's that compiling issue I mentioned. The build script finishes and I get a binary but it won't create a mounted volume or webpage.
./build_installer.sh
rm -f mlvfs dng.o index.o wav.o stripes.o cs.o amaze_demosaic_RT.o hdr.o histogram.o mongoose/mongoose.o webgui.o resource_manager.o lj92.o gif.o patternnoise.o LZMA/7zAlloc.o LZMA/7zBuf.o LZMA/7zBuf2.o LZMA/7zCrc.o LZMA/7zCrcOpt.o LZMA/7zDec.o LZMA/7zFile.o LZMA/7zIn.o LZMA/7zStream.o LZMA/Alloc.o LZMA/Bcj2.o LZMA/Bra.o LZMA/Bra86.o LZMA/BraIA64.o LZMA/CpuArch.o LZMA/Delta.o LZMA/LzFind.o LZMA/Lzma2Dec.o LZMA/Lzma2Enc.o LZMA/Lzma86Dec.o LZMA/Lzma86Enc.o LZMA/LzmaDec.o LZMA/LzmaEnc.o LZMA/LzmaLib.o LZMA/Ppmd7.o LZMA/Ppmd7Dec.o LZMA/Ppmd7Enc.o LZMA/Sha256.o LZMA/Xz.o LZMA/XzCrc64.o
gcc -c -Wall -D__DARWIN_64_BIT_INO_T=1 -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64 -I/usr/local/include/osxfuse -std=gnu99 -DVERSION="\"30aea14\"" -DBUILD_DATE="\"2016-03-17 01:18:13\"" -DFUSE_USE_VERSION=26 dng.c -o dng.o
In file included from dng.h:27:0,
from dng.c:28:
mlvfs.h:107:22: error: unknown type name '__always_inline'
#define FORCE_INLINE __always_inline
^
dng.c:793:8: note: in expansion of macro 'FORCE_INLINE'
static FORCE_INLINE size_t dng_get_image_data_inline(struct frame_headers * frame_headers, uint16_t * packed_bits, uint8_t * output_buffer, off_t offset, size_t max_size, int32_t bpp)
^
dng.c:793:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dng_get_image_data_inline'
static FORCE_INLINE size_t dng_get_image_data_inline(struct frame_headers * frame_headers, uint16_t * packed_bits, uint8_t * output_buffer, off_t offset, size_t max_size, int32_t bpp)
^
dng.c: In function 'dng_get_image_data':
dng.c:841:20: warning: implicit declaration of function 'dng_get_image_data_inline' [-Wimplicit-function-declaration]
return dng_get_image_data_inline(frame_headers, packed_bits, output_buffer, offset, max_size, 8);
^
make: *** [dng.o] Error 1
cp: mlvfs/mlvfs: No such file or directory
...
...
created: /Users/rosiefort/mlvfs/pack.temp.dmg
chmod: /Volumes/MLVFS/.Trashes: Permission denied
"disk7" unmounted.
"disk7" ejected.
Preparing imaging engine…
Reading Protective Master Boot Record (MBR : 0)…
(CRC32 $9A1DC65A: Protective Master Boot Record (MBR : 0))
Reading GPT Header (Primary GPT Header : 1)…
(CRC32 $9598AAEB: GPT Header (Primary GPT Header : 1))
Reading GPT Partition Data (Primary GPT Table : 2)…
(CRC32 $7D08CF8A: GPT Partition Data (Primary GPT Table : 2))
Reading (Apple_Free : 3)…
(CRC32 $00000000: (Apple_Free : 3))
Reading disk image (Apple_HFS : 4)…
...
(CRC32 $C1163E58: disk image (Apple_HFS : 4))
Reading (Apple_Free : 5)…
...
(CRC32 $00000000: (Apple_Free : 5))
Reading GPT Partition Data (Backup GPT Table : 6)…
...
(CRC32 $7D08CF8A: GPT Partition Data (Backup GPT Table : 6))
Reading GPT Header (Backup GPT Header : 7)…
...
(CRC32 $B05F628B: GPT Header (Backup GPT Header : 7))
Adding resources…
...
Elapsed Time: 2.070s
File size: 1500593 bytes, Checksum: CRC32 $B1F95B1F
Sectors processed: 16384, 13964 compressed
Speed: 3.3Mbytes/sec
Savings: 82.1%
created: /Users/rosiefort/mlvfs/MLVFS.dmg