diff options
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rw-r--r-- | xdelta3/xdelta3-main.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index 4a75ac1..acb0ac0 100644 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h | |||
@@ -1694,10 +1694,11 @@ main_merge_arguments (main_merge_list* merges) | |||
1694 | { | 1694 | { |
1695 | xd3_stream tmp_stream; | 1695 | xd3_stream tmp_stream; |
1696 | memset (& tmp_stream, 0, sizeof (tmp_stream)); | 1696 | memset (& tmp_stream, 0, sizeof (tmp_stream)); |
1697 | ret = xd3_merge_inputs (& tmp_stream, | 1697 | if ((ret = xd3_config_stream (& tmp_stream, NULL)) || |
1698 | & merge_input.whole_target, | 1698 | (ret = xd3_whole_state_init (& tmp_stream)) || |
1699 | & recode_stream->whole_target); | 1699 | (ret = xd3_merge_inputs (& tmp_stream, |
1700 | if (ret != 0) | 1700 | & merge_input.whole_target, |
1701 | & recode_stream->whole_target))) | ||
1701 | { | 1702 | { |
1702 | XPR(NT XD3_LIB_ERRMSG (&tmp_stream, ret)); | 1703 | XPR(NT XD3_LIB_ERRMSG (&tmp_stream, ret)); |
1703 | } | 1704 | } |
@@ -1789,6 +1790,17 @@ main_merge_output (xd3_stream *stream, main_file *ofile) | |||
1789 | xoff_t output_pos = 0; | 1790 | xoff_t output_pos = 0; |
1790 | xd3_source recode_source; | 1791 | xd3_source recode_source; |
1791 | 1792 | ||
1793 | /* merge_stream is set if there were arguments. this stream's input | ||
1794 | * needs to be applied to the merge_stream source. */ | ||
1795 | if (merge_stream != NULL && | ||
1796 | (ret = xd3_merge_inputs (stream, | ||
1797 | & merge_stream->whole_target, | ||
1798 | & stream->whole_target))) | ||
1799 | { | ||
1800 | XPR(NT XD3_LIB_ERRMSG (stream, ret)); | ||
1801 | return ret; | ||
1802 | } | ||
1803 | |||
1792 | /* Enter the ENC_INPUT state and bypass the next_in == NULL test | 1804 | /* Enter the ENC_INPUT state and bypass the next_in == NULL test |
1793 | * and (leftover) input buffering logic. */ | 1805 | * and (leftover) input buffering logic. */ |
1794 | XD3_ASSERT(recode_stream->enc_state == ENC_INIT); | 1806 | XD3_ASSERT(recode_stream->enc_state == ENC_INIT); |