summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg/old/A04-dv-eof.patch
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2017-12-25 23:53:54 +0100
committerBradley Sepos <[email protected]>2018-05-28 23:56:18 -0400
commit2326243b027a6341285bbfee9d99bc23567e2b5e (patch)
tree518164dfa7a3d195ded39672c11d823526694c43 /contrib/ffmpeg/old/A04-dv-eof.patch
parent6c5faa037d2955421dd7bae44f6f5f15b9b011a2 (diff)
FFMPEG #974: Use latest FFMPEG 3.4.1 (2/2)
Patch 2/2 for https://github.com/HandBrake/HandBrake/issues/974 moving to FFMPEG 3.4.1 from LIBAV 12.2. All patches have been moved to subfolder 'old' since they do not apply cleanly anymore. Work has to be performed to validate whether patches are still required.
Diffstat (limited to 'contrib/ffmpeg/old/A04-dv-eof.patch')
-rw-r--r--contrib/ffmpeg/old/A04-dv-eof.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/ffmpeg/old/A04-dv-eof.patch b/contrib/ffmpeg/old/A04-dv-eof.patch
new file mode 100644
index 000000000..7afecff35
--- /dev/null
+++ b/contrib/ffmpeg/old/A04-dv-eof.patch
@@ -0,0 +1,37 @@
+From 1f5593ff0a2d9fee94fe39aa52fb8a81d7383ebb Mon Sep 17 00:00:00 2001
+From: John Stebbins <[email protected]>
+Date: Wed, 11 Jan 2017 12:17:06 -0700
+Subject: [PATCH] dv: Don't return EIO upon EOF
+
+---
+ libavformat/dv.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/dv.c b/libavformat/dv.c
+index d4e5180..7e52e42 100644
+--- a/libavformat/dv.c
++++ b/libavformat/dv.c
+@@ -478,7 +478,7 @@ static int dv_read_header(AVFormatContext *s)
+
+ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)
+ {
+- int size;
++ int size, result;
+ RawDVContext *c = s->priv_data;
+
+ size = avpriv_dv_get_packet(c->dv_demux, pkt);
+@@ -487,7 +487,10 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)
+ if (!c->dv_demux->sys)
+ return AVERROR(EIO);
+ size = c->dv_demux->sys->frame_size;
+- if (avio_read(s->pb, c->buf, size) <= 0)
++ result = avio_read(s->pb, c->buf, size);
++ if (result == AVERROR_EOF)
++ return result;
++ if (result <= 0)
+ return AVERROR(EIO);
+
+ size = avpriv_dv_produce_packet(c->dv_demux, pkt, c->buf, size);
+--
+2.9.3
+