Skip to content

Commit 574ec1f

Browse files
committed
change: skip fmp4 miss track
1 parent 1b81ae3 commit 574ec1f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

libmov/source/mov-tfra.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ int mov_read_tfra(struct mov_t* mov, const struct mov_box_t* box)
1919

2020
track = mov_find_track(mov, track_ID);
2121
if (NULL == track)
22-
return -1;
22+
{
23+
mov_buffer_skip(&mov->io, box->size - 8);
24+
return mov_buffer_error(&mov->io);
25+
}
2326

2427
length_size_of = mov_buffer_r32(&mov->io); /* length_size_of XXX */
2528
number_of_entry = mov_buffer_r32(&mov->io); /* number_of_entry */

libmov/test/fmp4-writer-test2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ void fmp4_writer_test2(const char* mp4, const char* outmp4)
5252
fmp4_writer_destroy(fmp4);
5353
mov_reader_destroy(mov);
5454
fclose(wfile.fp);
55-
fclose(wfile.fp);
55+
fclose(file.fp);
5656
}

libmov/test/mov-reader-test.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ static void onread(void* flv, uint32_t track, const void* buffer, size_t bytes,
114114
//int n = aom_av1_codec_configuration_record_save(&s_av1, s_packet, sizeof(s_packet));
115115
//fwrite(s_packet, 1, n, s_vfp);
116116
}
117-
118-
else if (it->second == "ACC")
117+
else if (it->second == "AAC")
119118
{
120119
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);
121120
a_pts = pts;

0 commit comments

Comments
 (0)