Commit f6dca10f authored by Gildas Bazin's avatar Gildas Bazin

* modules/stream_out/transcode.c, modules/codec/ffmpeg/encoder.c: move the ffmpeg pts hack to the ffmpeg encoder.
parent 1e13b57c
......@@ -2,7 +2,7 @@
* encoder.c: video and audio encoder using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: encoder.c,v 1.2 2003/10/27 17:50:54 gbazin Exp $
* $Id: encoder.c,v 1.3 2003/10/27 19:48:16 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -224,7 +224,11 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
frame.linesize[i_plane] = p_pict->p[i_plane].i_pitch;
}
/* Set the pts of the frame being encoded (segfaults with mpeg4!)*/
if( p_enc->i_fourcc == VLC_FOURCC( 'm', 'p', 'g', 'v' ) )
frame.pts = p_pict->date;
else
frame.pts = 0;
/* Let ffmpeg select the frame type */
frame.pict_type = 0;
......
......@@ -2,7 +2,7 @@
* transcode.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: transcode.c,v 1.45 2003/10/27 17:50:54 gbazin Exp $
* $Id: transcode.c,v 1.46 2003/10/27 19:48:16 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -729,7 +729,7 @@ static int transcode_audio_ffmpeg_process( sout_stream_t *p_stream,
(int16_t*)id->p_buffer, &id->i_buffer_pos,
p_buffer, i_buffer );
#if 1
#if 0
msg_Warn( p_stream, "avcodec_decode_audio: %d used on %d",
i_used, i_buffer );
#endif
......@@ -1274,13 +1274,6 @@ static int transcode_video_ffmpeg_process( sout_stream_t *p_stream,
frame = id->p_ff_pic_tmp2;
}
/* Set the pts of the frame being encoded (segfaults with mpeg4!)*/
if( id->p_encoder ||
id->f_dst.i_fourcc == VLC_FOURCC( 'm', 'p', 'g', 'v' ) )
frame->pts = p_sys->i_output_pts;
else
frame->pts = 0;
/* Interpolate the next PTS
* (needed by the mpeg video packetizer which can send pts <= 0 ) */
if( id->ff_dec_c && id->ff_dec_c->frame_rate > 0 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment