Originally committed as revision 25683 to svn://svn.ffmpeg.org/ffmpeg/trunk
Reimar Döffinger authored on 2010/11/07 01:48:41... | ... |
@@ -277,42 +277,42 @@ static void parse_presentation_segment(AVCodecContext *avctx, |
277 | 277 |
|
278 | 278 |
ctx->presentation.id_number = bytestream_get_be16(&buf); |
279 | 279 |
|
280 |
- /* |
|
281 |
- * Skip 3 bytes of unknown: |
|
282 |
- * state |
|
283 |
- * palette_update_flag (0x80), |
|
284 |
- * palette_id_to_use, |
|
285 |
- */ |
|
286 |
- buf += 3; |
|
287 |
- |
|
288 |
- ctx->presentation.object_number = bytestream_get_byte(&buf); |
|
289 |
- if (!ctx->presentation.object_number) |
|
290 |
- return; |
|
291 |
- |
|
292 |
- /* |
|
293 |
- * Skip 4 bytes of unknown: |
|
294 |
- * object_id_ref (2 bytes), |
|
295 |
- * window_id_ref, |
|
296 |
- * composition_flag (0x80 - object cropped, 0x40 - object forced) |
|
297 |
- */ |
|
298 |
- buf += 4; |
|
299 |
- |
|
300 |
- x = bytestream_get_be16(&buf); |
|
301 |
- y = bytestream_get_be16(&buf); |
|
302 |
- |
|
303 |
- /* TODO If cropping, cropping_x, cropping_y, cropping_width, cropping_height (all 2 bytes).*/ |
|
304 |
- |
|
305 |
- dprintf(avctx, "Subtitle Placement x=%d, y=%d\n", x, y); |
|
306 |
- |
|
307 |
- if (x > avctx->width || y > avctx->height) { |
|
308 |
- av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n", |
|
309 |
- x, y, avctx->width, avctx->height); |
|
310 |
- x = 0; y = 0; |
|
311 |
- } |
|
280 |
+ /* |
|
281 |
+ * Skip 3 bytes of unknown: |
|
282 |
+ * state |
|
283 |
+ * palette_update_flag (0x80), |
|
284 |
+ * palette_id_to_use, |
|
285 |
+ */ |
|
286 |
+ buf += 3; |
|
287 |
+ |
|
288 |
+ ctx->presentation.object_number = bytestream_get_byte(&buf); |
|
289 |
+ if (!ctx->presentation.object_number) |
|
290 |
+ return; |
|
291 |
+ |
|
292 |
+ /* |
|
293 |
+ * Skip 4 bytes of unknown: |
|
294 |
+ * object_id_ref (2 bytes), |
|
295 |
+ * window_id_ref, |
|
296 |
+ * composition_flag (0x80 - object cropped, 0x40 - object forced) |
|
297 |
+ */ |
|
298 |
+ buf += 4; |
|
299 |
+ |
|
300 |
+ x = bytestream_get_be16(&buf); |
|
301 |
+ y = bytestream_get_be16(&buf); |
|
302 |
+ |
|
303 |
+ /* TODO If cropping, cropping_x, cropping_y, cropping_width, cropping_height (all 2 bytes).*/ |
|
304 |
+ |
|
305 |
+ dprintf(avctx, "Subtitle Placement x=%d, y=%d\n", x, y); |
|
306 |
+ |
|
307 |
+ if (x > avctx->width || y > avctx->height) { |
|
308 |
+ av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n", |
|
309 |
+ x, y, avctx->width, avctx->height); |
|
310 |
+ x = 0; y = 0; |
|
311 |
+ } |
|
312 | 312 |
|
313 |
- /* Fill in dimensions */ |
|
314 |
- ctx->presentation.x = x; |
|
315 |
- ctx->presentation.y = y; |
|
313 |
+ /* Fill in dimensions */ |
|
314 |
+ ctx->presentation.x = x; |
|
315 |
+ ctx->presentation.y = y; |
|
316 | 316 |
} |
317 | 317 |
|
318 | 318 |
/** |