|
44 | 44 | "(c) 2002-20016 Axiomatic Systems, LLC" |
45 | 45 |
|
46 | 46 | const unsigned int AP4_MUX_DEFAULT_VIDEO_FRAME_RATE = 24; |
| 47 | +const unsigned int AP4_MUX_READ_BUFFER_SIZE = 65536; |
47 | 48 |
|
48 | 49 | /*---------------------------------------------------------------------- |
49 | 50 | | globals |
@@ -301,7 +302,7 @@ AddAacTrack(AP4_Movie& movie, |
301 | 302 | } |
302 | 303 |
|
303 | 304 | // read some data and feed the parser |
304 | | - AP4_UI08 input_buffer[4096]; |
| 305 | + AP4_UI08 input_buffer[AP4_MUX_READ_BUFFER_SIZE]; |
305 | 306 | AP4_Size to_read = parser.GetBytesFree(); |
306 | 307 | if (to_read) { |
307 | 308 | AP4_Size bytes_read = 0; |
@@ -381,7 +382,7 @@ AddH264Track(AP4_Movie& movie, |
381 | 382 | AP4_AvcFrameParser parser; |
382 | 383 | for (;;) { |
383 | 384 | bool eos; |
384 | | - unsigned char input_buffer[4096]; |
| 385 | + unsigned char input_buffer[AP4_MUX_READ_BUFFER_SIZE]; |
385 | 386 | AP4_Size bytes_in_buffer = 0; |
386 | 387 | result = input->ReadPartial(input_buffer, sizeof(input_buffer), bytes_in_buffer); |
387 | 388 | if (AP4_SUCCEEDED(result)) { |
@@ -602,7 +603,7 @@ AddH265Track(AP4_Movie& movie, |
602 | 603 | AP4_HevcFrameParser parser; |
603 | 604 | for (;;) { |
604 | 605 | bool eos; |
605 | | - unsigned char input_buffer[4096]; |
| 606 | + unsigned char input_buffer[AP4_MUX_READ_BUFFER_SIZE]; |
606 | 607 | AP4_Size bytes_in_buffer = 0; |
607 | 608 | result = input->ReadPartial(input_buffer, sizeof(input_buffer), bytes_in_buffer); |
608 | 609 | if (AP4_SUCCEEDED(result)) { |
|
0 commit comments