Skip to content

Commit

Permalink
change: skip fmp4 miss track
Browse files Browse the repository at this point in the history
  • Loading branch information
ireader committed Apr 27, 2024
1 parent 1b81ae3 commit 574ec1f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion libmov/source/mov-tfra.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ int mov_read_tfra(struct mov_t* mov, const struct mov_box_t* box)

track = mov_find_track(mov, track_ID);
if (NULL == track)
return -1;
{
mov_buffer_skip(&mov->io, box->size - 8);
return mov_buffer_error(&mov->io);
}

length_size_of = mov_buffer_r32(&mov->io); /* length_size_of XXX */
number_of_entry = mov_buffer_r32(&mov->io); /* number_of_entry */
Expand Down
2 changes: 1 addition & 1 deletion libmov/test/fmp4-writer-test2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ void fmp4_writer_test2(const char* mp4, const char* outmp4)
fmp4_writer_destroy(fmp4);
mov_reader_destroy(mov);
fclose(wfile.fp);
fclose(wfile.fp);
fclose(file.fp);
}
3 changes: 1 addition & 2 deletions libmov/test/mov-reader-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ static void onread(void* flv, uint32_t track, const void* buffer, size_t bytes,
//int n = aom_av1_codec_configuration_record_save(&s_av1, s_packet, sizeof(s_packet));
//fwrite(s_packet, 1, n, s_vfp);
}

else if (it->second == "ACC")
else if (it->second == "AAC")
{
printf("[AAC] pts: %s, dts: %s, diff: %03d/%03d, bytes: %u\n", ftimestamp(pts, s_pts), ftimestamp(dts, s_dts), (int)(pts - a_pts), (int)(dts - a_dts), (unsigned int)bytes);
a_pts = pts;
Expand Down

0 comments on commit 574ec1f

Please sign in to comment.