Mercurial > libavcodec.hg
comparison libtheoraenc.c @ 10437:00bd0c4c1489 libavcodec
Remove pointless parentheses.
author | diego |
---|---|
date | Mon, 19 Oct 2009 15:14:00 +0000 |
parents | 9262948fd649 |
children | b4b55a3d65c9 |
comparison
equal
deleted
inserted
replaced
10436:a050e8857f00 | 10437:00bd0c4c1489 |
---|---|
57 message = "ogg_packet is larger than 65535 bytes"; | 57 message = "ogg_packet is larger than 65535 bytes"; |
58 } else if (newsize < avc_context->extradata_size) { | 58 } else if (newsize < avc_context->extradata_size) { |
59 message = "extradata_size would overflow"; | 59 message = "extradata_size would overflow"; |
60 } else { | 60 } else { |
61 newdata = av_realloc(avc_context->extradata, newsize); | 61 newdata = av_realloc(avc_context->extradata, newsize); |
62 if (newdata == NULL) { | 62 if (newdata == NULL) |
63 message = "av_realloc failed"; | 63 message = "av_realloc failed"; |
64 } | |
65 } | 64 } |
66 if (message != NULL) { | 65 if (message != NULL) { |
67 av_log(avc_context, AV_LOG_ERROR, "concatenate_packet failed: %s\n", message); | 66 av_log(avc_context, AV_LOG_ERROR, "concatenate_packet failed: %s\n", message); |
68 return -1; | 67 return -1; |
69 } | 68 } |
149 */ | 148 */ |
150 offset = 0; | 149 offset = 0; |
151 | 150 |
152 /* Header */ | 151 /* Header */ |
153 theora_encode_header( &(h->t_state), &o_packet ); | 152 theora_encode_header( &(h->t_state), &o_packet ); |
154 if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) { | 153 if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) |
155 return -1; | 154 return -1; |
156 } | |
157 | 155 |
158 /* Comment */ | 156 /* Comment */ |
159 theora_comment_init( &t_comment ); | 157 theora_comment_init( &t_comment ); |
160 theora_encode_comment( &t_comment, &o_packet ); | 158 theora_encode_comment( &t_comment, &o_packet ); |
161 if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) { | 159 if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) |
162 return -1; | 160 return -1; |
163 } | |
164 /* Clear up theora_comment struct before we reset the packet */ | 161 /* Clear up theora_comment struct before we reset the packet */ |
165 theora_comment_clear( &t_comment ); | 162 theora_comment_clear( &t_comment ); |
166 /* And despite documentation to the contrary, theora_comment_clear | 163 /* And despite documentation to the contrary, theora_comment_clear |
167 * does not release the packet */ | 164 * does not release the packet */ |
168 ogg_packet_clear(&o_packet); | 165 ogg_packet_clear(&o_packet); |
169 | 166 |
170 /* Tables */ | 167 /* Tables */ |
171 theora_encode_tables( &(h->t_state), &o_packet ); | 168 theora_encode_tables( &(h->t_state), &o_packet ); |
172 if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) { | 169 if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) |
173 return -1; | 170 return -1; |
174 } | |
175 | 171 |
176 /* Set up the output AVFrame */ | 172 /* Set up the output AVFrame */ |
177 avc_context->coded_frame= avcodec_alloc_frame(); | 173 avc_context->coded_frame= avcodec_alloc_frame(); |
178 | 174 |
179 return 0; | 175 return 0; |