avformat/pva: Check for EOF before retrying in read_part_of_packet()
[ffmpeg.git] / libavdevice / openal-dec.c
index b552158..cab1eb6 100644 (file)
@@ -204,7 +204,7 @@ static int read_packet(AVFormatContext* ctx, AVPacket *pkt)
 fail:
     /* Handle failure */
     if (pkt->data)
-        av_destruct_packet(pkt);
+        av_free_packet(pkt);
     if (error_msg)
         av_log(ctx, AV_LOG_ERROR, "Error: %s\n", error_msg);
     return error;