ffmpeg | branch: master | erankor <eran.kornb...@kaltura.com> | Wed May 17 12:32:06 2017 +0300| [15bd309af8302661838150de1905acc4df386d19] | committer: Michael Niedermayer
movenc: encryption with time code track fix instead of deciding whether to encrypt based on the encryption scheme, decide according to whether cenc was initialized or not. mov_create_timecode_track calls ff_mov_write_packet with a track that doesn't have cenc initialized. Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15bd309af8302661838150de1905acc4df386d19 --- libavformat/movenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 8bcd335172..ca389e3a97 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2353,7 +2353,7 @@ static int mov_write_stbl_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext mov_write_stsc_tag(pb, track); mov_write_stsz_tag(pb, track); mov_write_stco_tag(pb, track); - if (mov->encryption_scheme == MOV_ENC_CENC_AES_CTR) { + if (track->cenc.aes_ctr) { ff_mov_cenc_write_stbl_atoms(&track->cenc, pb); } if (track->par->codec_id == AV_CODEC_ID_OPUS) { @@ -5114,7 +5114,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) &size); avio_write(pb, reformatted_data, size); } else { - if (mov->encryption_scheme == MOV_ENC_CENC_AES_CTR) { + if (trk->cenc.aes_ctr) { size = ff_mov_cenc_avc_parse_nal_units(&trk->cenc, pb, pkt->data, size); if (size < 0) { ret = size; @@ -5143,7 +5143,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) avio_write(pb, pkt->data, size); #endif } else { - if (mov->encryption_scheme == MOV_ENC_CENC_AES_CTR) { + if (trk->cenc.aes_ctr) { if (par->codec_id == AV_CODEC_ID_H264 && par->extradata_size > 4) { int nal_size_length = (par->extradata[4] & 0x3) + 1; ret = ff_mov_cenc_avc_write_nal_units(s, &trk->cenc, nal_size_length, pb, pkt->data, size); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog