changeset 4172:fdadd576d584 libavformat

Do not try to duplicate packets that have data==NULL.
author michael
date Wed, 07 Jan 2009 20:44:23 +0000
parents 6af3e7ab7cbb
children 6088f5935138
files utils.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Wed Jan 07 16:01:15 2009 +0000
+++ b/utils.c	Wed Jan 07 20:44:23 2009 +0000
@@ -295,7 +295,7 @@
 
 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)