Browse Source

ffmpeg: remove unneeded ost->picref check.

If there ost->picref is NULL, it will likely crash anyway a few lines
below by dereferencing it in order to access video attribute.
tags/n0.11
Clément Bœsch 13 years ago
parent
commit
b986590810
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      ffmpeg.c

+ 2
- 4
ffmpeg.c View File

@@ -2141,10 +2141,8 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
}
filtered_frame = ist->filtered_frame;
*filtered_frame= *decoded_frame; //for me_threshold
if (ost->picref) {
avfilter_fill_frame_from_video_buffer_ref(filtered_frame, ost->picref);
filtered_frame->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q);
}
avfilter_fill_frame_from_video_buffer_ref(filtered_frame, ost->picref);
filtered_frame->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q);
if (ost->picref->video && !ost->frame_aspect_ratio)
ost->st->codec->sample_aspect_ratio = ost->picref->video->sample_aspect_ratio;
do_video_out(output_files[ost->file_index].ctx, ost, ist, filtered_frame);


Loading…
Cancel
Save