Mercurial > libavformat.hg
comparison swf.c @ 1641:ea284c26b0f4 libavformat
priv_data is allocated internally
author | bcoudurier |
---|---|
date | Sun, 14 Jan 2007 02:21:28 +0000 |
parents | ec1236a03504 |
children | 8b62e4e73069 |
comparison
equal
deleted
inserted
replaced
1640:ec1236a03504 | 1641:ea284c26b0f4 |
---|---|
737 return 0; | 737 return 0; |
738 } | 738 } |
739 | 739 |
740 static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) | 740 static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) |
741 { | 741 { |
742 SWFContext *swf = 0; | 742 SWFContext *swf = s->priv_data; |
743 ByteIOContext *pb = &s->pb; | 743 ByteIOContext *pb = &s->pb; |
744 int nbits, len, frame_rate, tag, v; | 744 int nbits, len, frame_rate, tag, v; |
745 offset_t firstTagOff; | 745 offset_t firstTagOff; |
746 AVStream *ast = 0; | 746 AVStream *ast = 0; |
747 AVStream *vst = 0; | 747 AVStream *vst = 0; |
748 | |
749 swf = av_malloc(sizeof(SWFContext)); | |
750 if (!swf) | |
751 return -1; | |
752 s->priv_data = swf; | |
753 | 748 |
754 tag = get_be32(pb) & 0xffffff00; | 749 tag = get_be32(pb) & 0xffffff00; |
755 | 750 |
756 if (tag == MKBETAG('C', 'W', 'S', 0)) | 751 if (tag == MKBETAG('C', 'W', 'S', 0)) |
757 { | 752 { |