Changeset acbd501ea8663f6d7a1a3ecd90f7b4e7bceed16b
- Timestamp:
- 22/02/04 00:50:52
(5 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1077407452 +0000
- git-parent:
[b6fde88ed9664916983ea43fc5f3d7ee76a96748]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1077407452 +0000
- Message:
* modules/stream_out/transcode.c: fixed memleak. Set aspect ratio info even for raw video input.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r8408f63 |
racbd501 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2003-2004 VideoLAN |
|---|
| 5 | | * $Id: transcode.c,v 1.78 2004/02/20 19:21:25 massiot Exp $ |
|---|
| | 5 | * $Id: transcode.c,v 1.79 2004/02/21 23:50:52 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| … | … | |
| 1042 | 1042 | id->ff_dec_c->height = id->f_src.video.i_height; |
|---|
| 1043 | 1043 | id->ff_dec_c->pix_fmt = get_ff_chroma( id->f_src.i_codec ); |
|---|
| | 1044 | |
|---|
| | 1045 | #if LIBAVCODEC_BUILD >= 4687 |
|---|
| | 1046 | if( id->ff_dec_c->width ) |
|---|
| | 1047 | id->ff_dec_c->sample_aspect_ratio = |
|---|
| | 1048 | av_d2q( id->f_src.video.i_aspect / (double)VOUT_ASPECT_FACTOR * |
|---|
| | 1049 | id->ff_dec_c->height / id->ff_dec_c->width, 255 ); |
|---|
| | 1050 | #else |
|---|
| | 1051 | id->ff_dec_c->aspect_ratio = |
|---|
| | 1052 | id->f_src.video.i_aspect / (float)VOUT_ASPECT_FACTOR; |
|---|
| | 1053 | #endif |
|---|
| 1044 | 1054 | } |
|---|
| 1045 | 1055 | else |
|---|
| … | … | |
| 1278 | 1288 | int i_plane; |
|---|
| 1279 | 1289 | |
|---|
| 1280 | | p_pic = malloc(sizeof(picture_t)); |
|---|
| 1281 | | |
|---|
| 1282 | 1290 | /* decode frame */ |
|---|
| 1283 | 1291 | frame = id->p_ff_pic; |
|---|
| … | … | |
| 1520 | 1528 | |
|---|
| 1521 | 1529 | /* Encoding */ |
|---|
| | 1530 | p_pic = malloc(sizeof(picture_t)); |
|---|
| 1522 | 1531 | vout_InitPicture( VLC_OBJECT(p_stream), p_pic, |
|---|
| 1523 | 1532 | id->p_encoder->fmt_in.i_codec, |
|---|
| … | … | |
| 1531 | 1540 | if ( p_sys->i_threads >= 1 ) |
|---|
| 1532 | 1541 | { |
|---|
| 1533 | | p_pic->p[i_plane].p_pixels = malloc(p_pic->p[i_plane].i_lines * p_pic->p[i_plane].i_pitch); |
|---|
| 1534 | | p_stream->p_vlc->pf_memcpy(p_pic->p[i_plane].p_pixels, frame->data[i_plane], p_pic->p[i_plane].i_lines * p_pic->p[i_plane].i_pitch); |
|---|
| | 1542 | p_pic->p[i_plane].p_pixels = malloc(p_pic->p[i_plane].i_lines * |
|---|
| | 1543 | p_pic->p[i_plane].i_pitch); |
|---|
| | 1544 | p_stream->p_vlc->pf_memcpy( p_pic->p[i_plane].p_pixels, |
|---|
| | 1545 | frame->data[i_plane], p_pic->p[i_plane].i_lines * |
|---|
| | 1546 | p_pic->p[i_plane].i_pitch ); |
|---|
| 1535 | 1547 | } |
|---|
| 1536 | 1548 | else |
|---|