0

Im using gst_mpegts_section_get_pat for reading the PAT table but it is raising segmentation fault. I'm passing a ts file to read. I used all the logics and everything what i can think of but I'm unable to find it out . The code snippet is as follows. BTW I took most of the code form the code i have taken from

static void dump_pat (GstMpegTsSection * section)
{
 printf ("dumb_pet \n");
 int i, len;
 GPtrArray *pat;

         pat = gst_mpegts_section_get_pat (section);
         len = pat->len;
         g_printf (" %d program(s):\n", len);

         for (i = 0; i < len; i++) {
             GstMpegTsPatProgram *patp = g_ptr_array_index (pat, i);

             g_print
                 (" program_number:%6d (0x%04x), network_or_program_map_PID:0x%04x\n",
                  patp->program_number, patp->program_number,
                  patp->network_or_program_map_PID);
         }

         g_ptr_array_unref (pat);

}
n0p
  • 3,399
  • 2
  • 29
  • 50
  • You're probably not very likely to get an answer here unless you provide a minimal test case that people can actually execute. That said, I don't think any of the gstreamer devs hang out here—you would probably have better luck on a gstreamer mailing list or the #gstreamer channel on irc.freenode.net. – nemequ Jun 13 '14 at 00:21

1 Answers1

0

Are you sure you are using the API correctly ? dump_pat is expecting a defined structure as a parameter, not a TS file, cf gst-libs/gst/mpegts/gstmpegtssection.h:

typedef struct _GstMpegTsSection GstMpegTsSection;

Have a look at the FAQ and the Documentation of Gstreamer.

n0p
  • 3,399
  • 2
  • 29
  • 50