[FFmpeg-devel] avformat/hlsenc: add error message for encrypt fmp4 mode

Submitted by Steven Liu on April 16, 2018, 5:44 a.m.

Details

Message ID 20180416054411.2233-1-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Steven Liu April 16, 2018, 5:44 a.m.
hlsenc have not support encrypty fmp4 yet now.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/hlsenc.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Gyan April 16, 2018, 5:56 a.m.
On 4/16/2018 11:14 AM, Steven Liu wrote:

> +            av_log(s, AV_LOG_ERROR, "have not support encrypt fmp4 now\n");

Suggest "Encrypted fmp4 not yet supported\n"

>               av_log(s, AV_LOG_WARNING, "Cannot use both -hls_key_info_file and -hls_enc,"
>                     " will use -hls_key_info_file priority\n");


"Cannot use both -hls_key_info_file and -hls_enc,"
" ignoring -hls_enc\n"

Thanks,
Gyan
Steven Liu April 16, 2018, 6:18 a.m.
> On 16 Apr 2018, at 13:56, Gyan Doshi <gyandoshi@gmail.com> wrote:
> 
> On 4/16/2018 11:14 AM, Steven Liu wrote:
> 
>> +            av_log(s, AV_LOG_ERROR, "have not support encrypt fmp4 now\n");
> 
> Suggest "Encrypted fmp4 not yet supported\n”
ok
> 
>>              av_log(s, AV_LOG_WARNING, "Cannot use both -hls_key_info_file and -hls_enc,"
>>                    " will use -hls_key_info_file priority\n");
> 
> 
> "Cannot use both -hls_key_info_file and -hls_enc,"
> " ignoring -hls_enc\n”
ok

I will resubmit a new patch.
> 
> Thanks,
> Gyan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Thanks
Steven

Patch hide | download patch | download mbox

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index c7540166ab..5c9e646962 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1591,6 +1591,11 @@  static int hls_start(AVFormatContext *s, VariantStream *vs)
     }
 
     if (c->key_info_file || c->encrypt) {
+        if (c->segment_type == SEGMENT_TYPE_FMP4) {
+            av_log(s, AV_LOG_ERROR, "have not support encrypt fmp4 now\n");
+            return AVERROR_PATCHWELCOME;
+        }
+
         if (c->key_info_file && c->encrypt) {
             av_log(s, AV_LOG_WARNING, "Cannot use both -hls_key_info_file and -hls_enc,"
                   " will use -hls_key_info_file priority\n");