Changeset 6675c2badad10a96f95a6d64dc8296ec4441f267
- Timestamp:
- 02/04/08 21:41:50
(6 months ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1207165310 +0200
- git-parent:
[885b6b8a436d9948d27c9bbf7b8e2018c283141d]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1207165310 +0200
- Message:
Fix snapshot with default video size. Please *test* your changes before commiting.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r78e39f0 |
r6675c2b |
|
| 721 | 721 | fmt_out.i_height = var_GetInteger( p_vout, "snapshot-height" ); |
|---|
| 722 | 722 | |
|---|
| | 723 | fmt_in = p_vout->fmt_in; |
|---|
| | 724 | |
|---|
| 723 | 725 | if( fmt_out.i_width == 0 && fmt_out.i_height > 0 ) |
|---|
| 724 | 726 | { |
|---|
| 725 | | float f = (float)p_vout->fmt_in.i_height / fmt_out.i_height; |
|---|
| 726 | | fmt_out.i_width = p_vout->fmt_in.i_width / f; |
|---|
| | 727 | float f = (float)fmt_in.i_height / fmt_out.i_height; |
|---|
| | 728 | fmt_out.i_width = fmt_in.i_width / f; |
|---|
| 727 | 729 | } |
|---|
| 728 | 730 | else if( fmt_out.i_height == 0 && fmt_out.i_width > 0 ) |
|---|
| 729 | 731 | { |
|---|
| 730 | | float f = (float)p_vout->fmt_in.i_width / fmt_out.i_width; |
|---|
| 731 | | fmt_out.i_height = p_vout->fmt_in.i_height / f; |
|---|
| | 732 | float f = (float)fmt_in.i_width / fmt_out.i_width; |
|---|
| | 733 | fmt_out.i_height = fmt_in.i_height / f; |
|---|
| | 734 | } |
|---|
| | 735 | else |
|---|
| | 736 | { |
|---|
| | 737 | fmt_out.i_width = fmt_in.i_width; |
|---|
| | 738 | fmt_out.i_height = fmt_in.i_height; |
|---|
| 732 | 739 | } |
|---|
| 733 | 740 | |
|---|
| 734 | 741 | /* Save the snapshot */ |
|---|
| 735 | | fmt_in = p_vout->fmt_in; |
|---|
| 736 | 742 | fmt_out.i_sar_num = fmt_out.i_sar_den = 1; |
|---|
| 737 | 743 | i_ret = image_WriteUrl( p_image, p_pic, &fmt_in, &fmt_out, psz_filename ); |
|---|