diff options
author | Michael Niedermayer | 2009-01-07 20:44:23 +0000 |
---|---|---|
committer | Michael Niedermayer | 2009-01-07 20:44:23 +0000 |
commit | 9f06bd9e96dca6bc1f67c748d03f017cc98adf13 (patch) | |
tree | 342737686559e4e1f8ce297281c798b411a93082 | |
parent | 1b9bbf86740bc6ef97fdf31f0744fac93e5640f2 (diff) |
Do not try to duplicate packets that have data==NULL.
Originally committed as revision 16483 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index eb5549979f..8a6784a2a4 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -295,7 +295,7 @@ int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size) int av_dup_packet(AVPacket *pkt) { - if (pkt->destruct != av_destruct_packet) { + if (pkt->destruct != av_destruct_packet && pkt->data) { uint8_t *data; /* We duplicate the packet and don't forget to add the padding again. */ if((unsigned)pkt->size > (unsigned)pkt->size + FF_INPUT_BUFFER_PADDING_SIZE) |