summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorNicolas Noirbent <nicolas.noirbent@smartjog.com>2012-01-13 09:58:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-13 15:57:34 +0100
commitc949d5b15d2af23dcbbe2cb35b819d4930625d15 (patch)
treed9cbe1c05a96abf579c5cc4a41f363de95750c65 /ffmpeg.c
parent62a22b2865f9afdadf0b6e272d002600803b17ec (diff)
downloadffmpeg-streaming-c949d5b15d2af23dcbbe2cb35b819d4930625d15.zip
ffmpeg-streaming-c949d5b15d2af23dcbbe2cb35b819d4930625d15.tar.gz
ffmpeg.c: transcode_video(): do not go through filter network if encoding is not required
This fixes a segmentation fault when doing a transcoding and a stream copy of the same input stream at the same time, e.g.: ffmpeg -i in.mkv -c:v mpeg2video transcode.m2v -c copy copy.ts Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 085bb00..2ee4032 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2078,7 +2078,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
frame_sample_aspect= av_opt_ptr(avcodec_get_frame_class(), decoded_frame, "sample_aspect_ratio");
for(i=0;i<nb_output_streams;i++) {
OutputStream *ost = ost = &output_streams[i];
- if(check_output_constraints(ist, ost)){
+ if(check_output_constraints(ist, ost) && ost->encoding_needed){
if (!frame_sample_aspect->num)
*frame_sample_aspect = ist->st->sample_aspect_ratio;
decoded_frame->pts = ist->pts;
OpenPOWER on IntegriCloud