- if ((err = av_dict_set(&options, "encryption_iv", iv_string, 0)) < 0)
- goto fail;
-
- filename = av_asprintf("crypto:%s", oc->url);
- if (!filename) {
- err = AVERROR(ENOMEM);
- goto fail;
- }
- err = hlsenc_io_open(s, &oc->pb, filename, &options);
- av_free(filename);
- av_dict_free(&options);
- if (err < 0)
- return err;
- } else if (c->segment_type != SEGMENT_TYPE_FMP4) {
- if ((err = hlsenc_io_open(s, &oc->pb, oc->url, &options)) < 0) {
- if (c->ignore_io_errors)
- err = 0;
- goto fail;
- }
- }
- if (vs->vtt_basename) {
- set_http_options(s, &options, c);
- if ((err = hlsenc_io_open(s, &vtt_oc->pb, vtt_oc->url, &options)) < 0) {
- if (c->ignore_io_errors)
- err = 0;
- goto fail;
+ memset(c->iv_string, 0, sizeof(c->iv_string));
+ memcpy(c->iv_string, iv_string, sizeof(iv_string));