[FS-9863] video_width/video_height unset with playback application Created: 19/Dec/16  Updated: 19/Dec/16  Resolved: 19/Dec/16

Status: Resolved
Project: FreeSWITCH
Component/s: core
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Josh Allmann Assignee: Mike Jerris
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

CPU Architecture:
x86-64
Kernel:
Linux
Userland:
GNU/Linux
Distribution:
Debian
Distribution Version:
Debian 8 jessie
Compiler:
gcc
FreeSWITCH GIT Revision: 82e4901d7c05689b10bed7445d8e8c49743329e1
GIT Master Revision hash:: 82e4901d7c05689b10bed7445d8e8c49743329e1

 Description   
https://freeswitch.org/jira/browse/FS-9553 introduced some unexpected behavior that led to the video_width/video_height channel variables being unset when they were previously available.

This is due to the CF_VIDEO_PAUSE_READ flag being set in video_write_thread (src/switch_core_media.c:5902), which leads to an early exit in switch_core_session_read_frame (src/switch_core_media.c:13569), before video_width/video_height have a chance to be set later in switch_core_session_read_frame.

The affected dial plan looks something like this:
 
    <extension name="fs-test">
      <condition field="destination_number" expression="^testest$">
        <action application="answer"/>
        <action application="video_decode" data="on"/>
        <action application="playback"
          data="/path/to/greeting.mp4"/>
        <action application="video_write_overlay" data="/path/to/overlay_${video_width}x${video_height}.png center-bot 0"/>
      </condition>
    </extension>
Generated at Tue Sep 19 19:18:02 CDT 2017 using JIRA 7.3.3#73014-sha1:d5be8da522213be2ca9ad7b043c51da6e4cc9754.