diff options
Diffstat (limited to 'tools/pes.c')
-rw-r--r-- | tools/pes.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/pes.c b/tools/pes.c index 2b68c55b..5ab9c1ac 100644 --- a/tools/pes.c +++ b/tools/pes.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: pes.c,v 1.4 2008-05-20 11:09:52 phintuka Exp $ + * $Id: pes.c,v 1.5 2008-07-29 14:01:36 phintuka Exp $ * */ @@ -111,7 +111,7 @@ int pes_is_frame_h264(const uint8_t *buf, int len) buf += 9 + buf[8]; - if (!buf[0] && !buf[1] && buf[2] == 0x01 && buf[3] == NAL_AUD) + if (IS_NAL_AUD(buf)) return 1; return 0; } @@ -142,11 +142,9 @@ int pes_get_video_size(const uint8_t *buf, int len, video_size_t *size, int h264 buf += i; len -= i; - if (h264 || (!buf[0] && !buf[1] && buf[2] == 0x01 && buf[3] == NAL_AUD)) + if (h264 || IS_NAL_AUD(buf)) return h264_get_video_size(buf, len, size); - else - return mpeg2_get_video_size(buf, len, size); - return 0; + return mpeg2_get_video_size(buf, len, size); } |