[FFmpeg-devel] svq3.c: parse frame size
Michael Niedermayer
michaelni
Thu Jul 30 08:42:40 CEST 2009
On Wed, Jul 29, 2009 at 12:00:52PM -0400, Ronald S. Bultje wrote:
> Hi,
>
> $subj, is used in RTP.
>
> As For Benoit's question why 128 instead of 120, it's in one of my
> notes on the format (I collected video sources streaming this and then
> noted what Quicktime said about the video size). Unfortunately, I
> don't have the source video anymore and can't find it so I can't
> confirm if it's a typo in my notes or just Quicktime player being
> stupid. I changed it to 120 because it looks more logical.
>
> Ronald
> svq3.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
> 68f20e4b5415f57b3cd22113982e414166bb0b6e svq3-read-size.patch
> Index: ffmpeg-svn/libavcodec/svq3.c
> ===================================================================
> --- ffmpeg-svn.orig/libavcodec/svq3.c 2009-07-29 11:57:35.000000000 -0400
> +++ ffmpeg-svn/libavcodec/svq3.c 2009-07-29 11:58:47.000000000 -0400
> @@ -819,12 +819,28 @@
> if (extradata && !memcmp(extradata, "SEQH", 4)) {
>
> GetBitContext gb;
> + int frame_size_code;
>
> size = AV_RB32(&extradata[4]);
> init_get_bits(&gb, extradata + 8, size*8);
>
> /* 'frame size code' and optional 'width, height' */
> - if (get_bits(&gb, 3) == 7) {
> + frame_size_code = get_bits(&gb, 3);
> + if (avctx->width <= 0 || avctx->height <= 0) {
why only then?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090730/c61b8692/attachment.pgp>
More information about the ffmpeg-devel
mailing list