Commit d1c5e760 authored by Gildas Bazin's avatar Gildas Bazin

* modules/stream_out/transcode.c: hack to work around ffmpeg encoding which...

* modules/stream_out/transcode.c: hack to work around ffmpeg encoding which doesn't like frames with identical pts.
* modules/codec/ffmpeg/encoder.c: one missing AV_NOPTS_VALUE.
parent 8bc62265
...@@ -558,7 +558,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) ...@@ -558,7 +558,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
} }
else else
{ {
frame.pts = 0; frame.pts = AV_NOPTS_VALUE;
} }
if ( frame.pts != AV_NOPTS_VALUE && frame.pts != 0 ) if ( frame.pts != AV_NOPTS_VALUE && frame.pts != 0 )
......
...@@ -1797,7 +1797,9 @@ static int transcode_video_ffmpeg_getframebuf(struct AVCodecContext *p_context, ...@@ -1797,7 +1797,9 @@ static int transcode_video_ffmpeg_getframebuf(struct AVCodecContext *p_context,
if( !p_context->has_b_frames || !p_sys->b_input_has_b_frames || if( !p_context->has_b_frames || !p_sys->b_input_has_b_frames ||
!p_frame->reference || !p_sys->i_output_pts ) !p_frame->reference || !p_sys->i_output_pts )
{ {
p_frame->pts = p_sys->i_input_dts; p_frame->pts = p_sys->i_input_dts +
/* Hack: ffmpeg encoding doesn't like frames with identical pts */
(p_sys->i_output_pts ? 0 : 50000);
} }
else p_frame->pts = AV_NOPTS_VALUE; else p_frame->pts = AV_NOPTS_VALUE;
} }
......
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