mirror of
https://github.com/mpv-player/mpv
synced 2024-12-15 11:25:10 +00:00
don't allocate (and demux_push() immediately) demux_packet()s > MAX_PACK_SIZE; releasing immediately audio packets (before the pes is complete) doesn't make any sense and deteriorates interleaving
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18462 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
dd9d768293
commit
e32c4c5712
@ -2823,6 +2823,8 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
||||
|
||||
if(*dp == NULL)
|
||||
{
|
||||
if(*buffer_size > MAX_PACK_BYTES)
|
||||
*buffer_size = MAX_PACK_BYTES;
|
||||
*dp = new_demux_packet(*buffer_size); //es->size
|
||||
*dp_offset = 0;
|
||||
if(! *dp)
|
||||
@ -2930,7 +2932,7 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
||||
(*dp)->pos = stream_tell(demuxer->stream);
|
||||
(*dp)->pts = es->pts;
|
||||
|
||||
if(is_audio)
|
||||
if(*dp_offset >= MAX_PACK_BYTES)
|
||||
{
|
||||
retv = fill_packet(demuxer, ds, dp, dp_offset, si);
|
||||
return 1;
|
||||
@ -3002,7 +3004,7 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
||||
}
|
||||
stream_skip(stream, junk);
|
||||
|
||||
if(is_audio)
|
||||
if(*dp_offset >= MAX_PACK_BYTES)
|
||||
{
|
||||
(*dp)->pts = tss->last_pts;
|
||||
retv = fill_packet(demuxer, ds, dp, dp_offset, si);
|
||||
|
Loading…
Reference in New Issue
Block a user