diff options
author | jstebbins <[email protected]> | 2011-06-21 10:35:55 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-06-21 10:35:55 +0000 |
commit | 65ba27af8f47971196c3c1b152b41a83ca1e3fc9 (patch) | |
tree | 11cbc40caf4338f1c6f72c9d8d463e217a166d42 /libhb/stream.c | |
parent | 3a4c8868d3ad56b0fba7012364b882bd19b1bf1a (diff) |
libhb: fix incorrect error message when adding substreams to ts list
The error message was meant to catch the case were a source has
more than 2 substreams in a stream. But due to incorrect order of
conditionals, it triggered when both substreams have been seen and
we try to add one of them again (which is allowed and should do nothing).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4071 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rw-r--r-- | libhb/stream.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index ddf20602b..83169ccc7 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -754,20 +754,20 @@ hb_stream_t * hb_bd_stream_open( hb_title_t *title ) d->ts[d->ts_number_pids].stream_kind = A; d->ts_number_pids++; } - else if ( d->ts[idx].number_substreams < kMaxNumberDecodeSubStreams ) + // Only add substream if it has not already been added. + else if ( index_of_substream( d, pid, substream_type ) < 0 ) { - // Only add substream if it has not already been added. - if ( index_of_substream( d, pid, substream_type ) < 0 ) + if ( d->ts[idx].number_substreams < kMaxNumberDecodeSubStreams ) { d->ts[idx].substream_type[d->ts[idx].number_substreams] = - substream_type; + substream_type; d->ts[idx].number_substreams++; d->ts[idx].stream_kind = A; } - } - else - { - hb_error( "hb_bd_stream_open: Too many substreams. Dropping audio 0x%x.", audio->id ); + else + { + hb_error( "hb_bd_stream_open: Too many substreams. Dropping audio 0x%x.", audio->id ); + } } } |