summaryrefslogtreecommitdiff
path: root/src/libmpeg2new/xine_decoder.c
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-12-07 15:34:29 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-12-07 15:34:29 +0000
commitc8fdff20285b59cd892297317572fbb4c3633f78 (patch)
tree102be6141b635eb2bff16358ca13b79924b211f4 /src/libmpeg2new/xine_decoder.c
parenta2dcf860b2777e530646abd00202c3fb5b3a5a81 (diff)
downloadxine-lib-c8fdff20285b59cd892297317572fbb4c3633f78.tar.gz
xine-lib-c8fdff20285b59cd892297317572fbb4c3633f78.tar.bz2
get rid of XINE_{ASSERT,ABORT} and useless xine_print_trace (useless). Replace XINE_ASSERT by _x_assert, which works exaclty as assert, except that it still warns with NDEBUG defined (but don't abort). Fix missuning of assert(0), which isn't safe, abort is abort, assert is for debugging purpose only, so all assert(0) has been converted to abort() alls. In osd_preload_fonts(): alloc needed memory chunk. Define NDEBUG in CFLAGS, for non DEBUG build only.
CVS patchset: 5860 CVS date: 2003/12/07 15:34:29
Diffstat (limited to 'src/libmpeg2new/xine_decoder.c')
-rw-r--r--src/libmpeg2new/xine_decoder.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libmpeg2new/xine_decoder.c b/src/libmpeg2new/xine_decoder.c
index 1f41f68b4..c30d1a967 100644
--- a/src/libmpeg2new/xine_decoder.c
+++ b/src/libmpeg2new/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.16 2003/12/05 15:54:59 f1rmb Exp $
+ * $Id: xine_decoder.c,v 1.17 2003/12/07 15:34:30 f1rmb Exp $
*
* stuff needed to turn libmpeg2 into a xine decoder plugin
*/
@@ -74,7 +74,7 @@ static void mpeg2_video_print_bad_state(uint32_t * img_state) {
m++;
}
}
- if (m > 3) assert(0);
+ if (m > 3) abort();
if (m == 0) printf("NO FRAMES\n");
}
@@ -206,7 +206,7 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b
#endif
if (this->img_state[img->id] != 0) {
printf ("libmpeg2:decode_data:get_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
this->img_state[img->id] = 1;
@@ -235,7 +235,7 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b
#endif
if (this->img_state[img->id] != 1) {
printf ("libmpeg2:decode_data:draw_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 1) {
frame_skipping = img->draw (img, this->stream);
@@ -246,7 +246,7 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b
}
if (info->discard_fbuf && !info->discard_fbuf->id) {
printf ("libmpeg2:decode_data:BAD free_frame discard_fbuf=%p\n", info->discard_fbuf);
- assert(0);
+ abort();
}
if (info->discard_fbuf && info->discard_fbuf->id) {
img = (vo_frame_t *) info->discard_fbuf->id;
@@ -255,7 +255,7 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b
#endif
if (this->img_state[img->id] != 2) {
printf ("libmpeg2:decode_data:free_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 2) {
img->free(img);
@@ -308,7 +308,7 @@ static void mpeg2_video_reset (video_decoder_t *this_gen) {
if (this->img_state[img->id] != 1) {
printf ("libmpeg2:decode_data:draw_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 1) {
frame_skipping = img->draw (img, this->stream);
@@ -319,13 +319,13 @@ static void mpeg2_video_reset (video_decoder_t *this_gen) {
if (info->discard_fbuf && !info->discard_fbuf->id) {
printf ("libmpeg2:decode_data:BAD free_frame discard_fbuf=%p\n", info->discard_fbuf);
- assert(0);
+ abort();
}
if (info->discard_fbuf && info->discard_fbuf->id) {
img = (vo_frame_t *) info->discard_fbuf->id;
if (this->img_state[img->id] != 2) {
printf ("libmpeg2:decode_data:free_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 2) {
img->free(img);
@@ -339,7 +339,7 @@ static void mpeg2_video_reset (video_decoder_t *this_gen) {
if (this->img_state[img->id] != 1) {
printf ("libmpeg2:decode_data:draw_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 1) {
frame_skipping = img->draw (img, this->stream);
@@ -350,13 +350,13 @@ static void mpeg2_video_reset (video_decoder_t *this_gen) {
if (info->discard_fbuf && !info->discard_fbuf->id) {
printf ("libmpeg2:decode_data:BAD free_frame discard_fbuf=%p\n", info->discard_fbuf);
- assert(0);
+ abort();
}
if (info->discard_fbuf && info->discard_fbuf->id) {
img = (vo_frame_t *) info->discard_fbuf->id;
if (this->img_state[img->id] != 2) {
printf ("libmpeg2:decode_data:free_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 2) {
img->free(img);
@@ -370,7 +370,7 @@ static void mpeg2_video_reset (video_decoder_t *this_gen) {
if (this->img_state[img->id] != 1) {
printf ("libmpeg2:decode_data:draw_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 1) {
frame_skipping = img->draw (img, this->stream);
@@ -381,13 +381,13 @@ static void mpeg2_video_reset (video_decoder_t *this_gen) {
if (info->discard_fbuf && !info->discard_fbuf->id) {
printf ("libmpeg2:decode_data:BAD free_frame discard_fbuf=%p\n", info->discard_fbuf);
- assert(0);
+ abort();
}
if (info->discard_fbuf && info->discard_fbuf->id) {
img = (vo_frame_t *) info->discard_fbuf->id;
if (this->img_state[img->id] != 2) {
printf ("libmpeg2:decode_data:free_frame id=%d BAD STATE:%d\n", img->id, this->img_state[img->id]);
- assert(0);
+ abort();
}
if (this->img_state[img->id] == 2) {
img->free(img);