summaryrefslogtreecommitdiff
path: root/src/codec/libav
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec/libav')
-rw-r--r--src/codec/libav/decoder.c1
-rw-r--r--src/codec/libav/demuxer.c8
2 files changed, 4 insertions, 5 deletions
diff --git a/src/codec/libav/decoder.c b/src/codec/libav/decoder.c
index 3a6ac06..e732be9 100644
--- a/src/codec/libav/decoder.c
+++ b/src/codec/libav/decoder.c
@@ -69,7 +69,6 @@ static bool lav_decoder_init(struct camu_decoder *dec, struct camu_renderer *ren
return true;
err:
close_internal(av);
-
return false;
}
diff --git a/src/codec/libav/demuxer.c b/src/codec/libav/demuxer.c
index fb05ec8..e276865 100644
--- a/src/codec/libav/demuxer.c
+++ b/src/codec/libav/demuxer.c
@@ -72,16 +72,16 @@ static bool lav_demuxer_init(struct camu_demuxer *demux, struct cch_handle *hand
enum AVMediaType type = stream->codecpar->codec_type;
// Try to detect attached images.
if (type == AVMEDIA_TYPE_VIDEO && GUESS_STREAM_IS_IMAGE(stream)) {
- al_log_info("lav_demux", "Assuming stream #%i is an image.", i);
+ al_log_info("lav_demux", "Guessing that stream #%u is an image.", i);
stream->duration = 0;
} else if (stream->duration < 0) {
- al_log_warn("lav_demux", "Stream #%i has invalid duration (%ld).", av->format_context->duration);
+ al_log_warn("lav_demux", "Stream #%u has an invalid duration (%ld).", i, av->format_context->duration);
if (av->format_context->duration < 0) {
stream->duration = 0;
} else {
stream->duration = av_rescale_q(av->format_context->duration, AV_TIME_BASE_Q, stream->time_base);
}
- al_log_info("lav_demux", "Setting stream #%i to a duration of %.3fs.", i, stream->duration * av_q2d(stream->time_base));
+ al_log_info("lav_demux", "Setting stream #%u to a duration of %.3fs.", i, stream->duration * av_q2d(stream->time_base));
}
if (stream->start_time < 0) stream->start_time = 0;
s64 duration = av_rescale_q(stream->duration, stream->time_base, AV_TIME_BASE_Q);
@@ -102,7 +102,6 @@ static bool lav_demuxer_init(struct camu_demuxer *demux, struct cch_handle *hand
return true;
err:
close_internal(av);
-
return false;
}
@@ -128,6 +127,7 @@ static s32 lav_demuxer_get_packet(struct camu_demuxer *demux, struct camu_packet
}
if (ret < 0) {
al_log_error("lav_demuxer", "Failed to read frame (%s).", av_err2str(ret));
+ continue;
}
if (!subscribed_to_index(demux, packet->av.pkt->stream_index)) {
av_packet_unref(packet->av.pkt);