From 47d88e8447b5b86f7eca03d302f2d17d2a4c9c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Wed, 11 Apr 2007 23:04:11 +0200 Subject: Detect absence of AFD and report only changes. The current code cannot detect the absence of AFD once it has been seen in the stream. As AFD can appear in user data after sequence, group or picture start codes, the idea is to reset the stored AFD value when processing the sequence start code. In the case where AFD is seen in user data, it is stored internally, to have it ready when the first slice is processed. At least at that time, AFD data has been seen and can be analyzed for changes. At any change, the AFD value will then be stored into a stream property. Doing this only for changes avoids locks while writing the same value over and over to the stream's property. --- src/libmpeg2/mpeg2.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libmpeg2/mpeg2.h') diff --git a/src/libmpeg2/mpeg2.h b/src/libmpeg2/mpeg2.h index 788fa823c..253f300a2 100644 --- a/src/libmpeg2/mpeg2.h +++ b/src/libmpeg2/mpeg2.h @@ -57,6 +57,12 @@ typedef struct mpeg2dec_s { int force_aspect; int force_pan_scan; + /* AFD data can be found after a sequence, group or picture start code */ + /* and will be stored in afd_value_seen. Later it will be transfered to */ + /* a stream property and stored into afd_value_reported to detect changes */ + int afd_value_seen; + int afd_value_reported; + xine_stream_t *stream; /* a spu decoder for possible closed captions */ -- cgit v1.2.3