diff options
author | wm4 <wm4@nowhere> | 2014-08-30 15:15:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-30 15:15:38 +0200 |
commit | 98ef68bdfd3696ff0db3792377392037d05257ae (patch) | |
tree | 7d6c9136713ba1cebef986b037175b01fb215735 | |
parent | 730d94741c4d528340ec26d3dbf4341da76b4918 (diff) |
demux_lavf: print a warning if av_read_frame() returns an error
Because why not.
-rw-r--r-- | demux/demux_lavf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 988c3da4e4..65a5264705 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -787,7 +787,12 @@ static int demux_lavf_fill_buffer(demuxer_t *demux) int r = av_read_frame(priv->avfc, pkt); if (r < 0) { av_free_packet(pkt); - return r == AVERROR(EAGAIN) ? 1 : -1; // eof + if (r == AVERROR(EAGAIN)) + return 1; + if (r == AVERROR_EOF) + return 0; + MP_WARN(demux, "error reading packet.\n"); + return -1; } add_new_streams(demux); |