}
/*
- * Used to reset a statically allocated AVPacket to a clean slate,
+ * Used to reset a statically allocated AVPacket to a clean state,
* containing no data.
*/
static void reset_packet(AVPacket *pkt)
* AVC SEI RBSP anyway */
return NULL;
- if (type == AVMEDIA_TYPE_UNKNOWN)
+ if (type == AVMEDIA_TYPE_UNKNOWN) {
+ av_log(c, AV_LOG_WARNING, "Can't support the type: %s\n", info->type);
return NULL;
+ }
/* URI is mandatory for subtitles as per spec */
- if (type == AVMEDIA_TYPE_SUBTITLE && !info->uri[0])
+ if (type == AVMEDIA_TYPE_SUBTITLE && !info->uri[0]) {
+ av_log(c, AV_LOG_ERROR, "The URI tag is REQUIRED for subtitle.\n");
return NULL;
+ }
/* TODO: handle subtitles (each segment has to parsed separately) */
if (c->ctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL)
- if (type == AVMEDIA_TYPE_SUBTITLE)
+ if (type == AVMEDIA_TYPE_SUBTITLE) {
+ av_log(c, AV_LOG_WARNING, "Can't support the subtitle(uri: %s)\n", info->uri);
return NULL;
+ }
rend = av_mallocz(sizeof(struct rendition));
if (!rend)
if (open_url(pls->parent, &pb, seg->key, c->avio_opts, opts, NULL) == 0) {
ret = avio_read(pb, pls->key, sizeof(pls->key));
if (ret != sizeof(pls->key)) {
- av_log(NULL, AV_LOG_ERROR, "Unable to read key file %s\n",
+ av_log(pls->parent, AV_LOG_ERROR, "Unable to read key file %s\n",
seg->key);
}
ff_format_io_close(pls->parent, &pb);
} else {
- av_log(NULL, AV_LOG_ERROR, "Unable to open key file %s\n",
+ av_log(pls->parent, AV_LOG_ERROR, "Unable to open key file %s\n",
seg->key);
}
av_strlcpy(pls->key_url, seg->key, sizeof(pls->key_url));
reload_interval = v->target_duration / 2;
}
if (v->cur_seq_no < v->start_seq_no) {
- av_log(NULL, AV_LOG_WARNING,
+ av_log(v->parent, AV_LOG_WARNING,
"skipping %d segments ahead, expired from playlists\n",
v->start_seq_no - v->cur_seq_no);
v->cur_seq_no = v->start_seq_no;
goto fail;
if (c->n_variants == 0) {
- av_log(NULL, AV_LOG_WARNING, "Empty playlist\n");
+ av_log(s, AV_LOG_WARNING, "Empty playlist\n");
ret = AVERROR_EOF;
goto fail;
}
}
if (c->variants[0]->playlists[0]->n_segments == 0) {
- av_log(NULL, AV_LOG_WARNING, "Empty playlist\n");
+ av_log(s, AV_LOG_WARNING, "Empty segment\n");
ret = AVERROR_EOF;
goto fail;
}