summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avconv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/avconv.c b/avconv.c
index be870a5273..6f64bc80a4 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1892,8 +1892,11 @@ static int output_packet(InputStream *ist,
if (ret < 0)
return ret;
- avpkt.data += ret;
- avpkt.size -= ret;
+ // touch data and size only if not EOF
+ if (pkt) {
+ avpkt.data += ret;
+ avpkt.size -= ret;
+ }
if (!got_output) {
continue;
}