X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Frtp%2Fgstrtpdvdepay.c;fp=gst%2Frtp%2Fgstrtpdvdepay.c;h=7d81a95a68c0c24e66925f6be83f61ea4709ceaf;hb=c44cd8f55bc0bf409e86b039cad0e2f757d5c77e;hp=ab9a83b91a854d3677d0ec0478742f254189385f;hpb=3e8ae7603ccbef3db071f8798a1d3809f40f8639;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/rtp/gstrtpdvdepay.c b/gst/rtp/gstrtpdvdepay.c index ab9a83b..7d81a95 100644 --- a/gst/rtp/gstrtpdvdepay.c +++ b/gst/rtp/gstrtpdvdepay.c @@ -336,12 +336,14 @@ gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstBuffer * in) GST_LOG_OBJECT (dvdepay, "got block at location %d", location); } - /* get the byte offset of the dif block */ - offset = location * 80; + if (location != -1) { + /* get the byte offset of the dif block */ + offset = location * 80; - /* And copy it in, provided the location is sane. */ - if (offset >= 0 && offset <= dvdepay->frame_size - 80) - gst_buffer_fill (dvdepay->acc, offset, payload, 80); + /* And copy it in, provided the location is sane. */ + if (offset <= dvdepay->frame_size - 80) + gst_buffer_fill (dvdepay->acc, offset, payload, 80); + } payload += 80; payload_len -= 80;