Mercurial > libavformat.hg
comparison nuv.c @ 4822:a751c4815d2d libavformat
Do not uselessly read version string into a buffer.
author | reimar |
---|---|
date | Tue, 07 Apr 2009 21:16:11 +0000 |
parents | bb26039e5f8c |
children | 4b571224b361 |
comparison
equal
deleted
inserted
replaced
4821:810c0bbb435e | 4822:a751c4815d2d |
---|---|
121 } | 121 } |
122 | 122 |
123 static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { | 123 static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { |
124 NUVContext *ctx = s->priv_data; | 124 NUVContext *ctx = s->priv_data; |
125 ByteIOContext *pb = s->pb; | 125 ByteIOContext *pb = s->pb; |
126 char id_string[12], version_string[5]; | 126 char id_string[12]; |
127 double aspect, fps; | 127 double aspect, fps; |
128 int is_mythtv, width, height, v_packs, a_packs; | 128 int is_mythtv, width, height, v_packs, a_packs; |
129 int stream_nr = 0; | 129 int stream_nr = 0; |
130 AVStream *vst = NULL, *ast = NULL; | 130 AVStream *vst = NULL, *ast = NULL; |
131 get_buffer(pb, id_string, 12); | 131 get_buffer(pb, id_string, 12); |
132 is_mythtv = !memcmp(id_string, "MythTVVideo", 12); | 132 is_mythtv = !memcmp(id_string, "MythTVVideo", 12); |
133 get_buffer(pb, version_string, 5); | 133 url_fskip(pb, 5); // version string |
134 url_fskip(pb, 3); // padding | 134 url_fskip(pb, 3); // padding |
135 width = get_le32(pb); | 135 width = get_le32(pb); |
136 height = get_le32(pb); | 136 height = get_le32(pb); |
137 get_le32(pb); // unused, "desiredwidth" | 137 get_le32(pb); // unused, "desiredwidth" |
138 get_le32(pb); // unused, "desiredheight" | 138 get_le32(pb); // unused, "desiredheight" |