[FFmpeg-devel] [PATCH 1/2] avisynth: Move to av_new_packet/av_free_packet.

Michael Niedermayer michaelni at gmx.at
Sun Dec 1 22:19:05 CET 2013


On Sun, Dec 01, 2013 at 05:32:01PM +0100, Marton Balint wrote:
> 
> 
> On Sun, 1 Dec 2013, Stephen Hutchinson wrote:
> 
> >---
> >libavformat/avisynth.c | 8 +++++---
> >1 file changed, 5 insertions(+), 3 deletions(-)
> >
> >diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
> >index e35306b..670f9d6 100644
> >--- a/libavformat/avisynth.c
> >+++ b/libavformat/avisynth.c
> >@@ -466,9 +466,11 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt,
> >                  (int64_t)avs->vi->height) * bits) / 8;
> >    if (!pkt->size)
> >        return AVERROR_UNKNOWN;
> >-    pkt->data = av_malloc(pkt->size);
> >-    if (!pkt->data)
> >+    av_new_packet(pkt, (int)pkt->size);
> >+    if (av_new_packet(pkt, (int)pkt->size) < 0) {
> 
> av_new_packet twice seems strange.

removed one

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131201/a30f2877/attachment.asc>


More information about the ffmpeg-devel mailing list