Merge commit '91622f6446b463abe6507ad2cd5d1fbf7e49c424'

* commit '91622f6446b463abe6507ad2cd5d1fbf7e49c424':
  avconv: Always initialize the opkt struct on streamcopy

Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2017-10-31 13:41:37 -03:00
commit 88c7aa13dd
1 changed files with 3 additions and 3 deletions

View File

@ -1969,7 +1969,9 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
InputFile *f = input_files [ist->file_index];
int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time;
int64_t ost_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ost->mux_timebase);
AVPacket opkt;
AVPacket opkt = { 0 };
av_init_packet(&opkt);
// EOF: flush output bitstream filters.
if (!pkt) {
@ -1977,8 +1979,6 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
return;
}
av_init_packet(&opkt);
if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) &&
!ost->copy_initial_nonkeyframes)
return;